backlink from team to club #275
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
on: | |
push: | |
branches: ["*"] | |
workflow_dispatch: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Pipenv | |
run: python -m pip install --upgrade pipenv | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Pipenv | |
id: cache-pipenv | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: pipenv-${{ hashFiles('Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: pipenv install --deploy --dev | |
- name: Set up locale | |
run: | | |
sudo locale-gen de_DE.UTF-8 | |
sudo dpkg-reconfigure locales | |
- name: Run tests with coverage | |
run: pipenv run hbcoverage | |
env: | |
TEST_OUTPUT_FILE_NAME: unit.xml | |
- name: Generate coverage report | |
run: pipenv run coverage xml | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage report | |
path: coverage.xml | |
- name: Unit Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: Unit Tests | |
path: unit.xml | |
reporter: java-junit | |
- name: Run Mypy | |
run: pipenv run mypy src | |
- name: Run Flake8 | |
run: pipenv run flake8 | |
- name: Run Pylint | |
run: pipenv run pylint src | |
- name: coveralls | |
run: pipenv run coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
codacy: | |
runs-on: ubuntu-latest | |
needs: main | |
steps: | |
- name: Download coverage report | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage report | |
- uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage.xml | |
codeclimate: | |
runs-on: ubuntu-latest | |
needs: main | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Download coverage report | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage report | |
- uses: paambaati/[email protected] # see https://github.com/paambaati/codeclimate-action/issues/638 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
codecov: | |
runs-on: ubuntu-latest | |
needs: main | |
steps: | |
- name: Download coverage report | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage report | |
- uses: codecov/codecov-action@v3 | |
licenses: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: "Run FOSSA Scan" | |
uses: fossas/fossa-action@v1 | |
with: | |
api-key: ${{secrets.FOSSA_API_KEY}} | |
- name: "Run FOSSA Test" | |
uses: fossas/fossa-action@v1 | |
with: | |
api-key: ${{secrets.FOSSA_API_KEY}} | |
run-tests: true | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: buildx-${{ github.sha }} | |
restore-keys: | | |
buildx- | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: djbrown/hbscorez:latest | |
builder: ${{ steps.buildx.outputs.name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |