last updates and changelog #63
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: check | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" and "develop" branch | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main, develop] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install and configure poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install poetry-dynamic-versioning plugin | |
run: | | |
poetry self add "poetry-dynamic-versioning[plugin]" | |
- name: Load cached venv if cache exists | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: bandit | |
run: | | |
task check:bandit | |
- name: flake8 | |
run: | | |
task check:flake8 | |
- name: mypy | |
run: | | |
task check:mypy | |
- name: pylint | |
run: | | |
task check:pylint | |
- name: pytest | |
env: | |
CMEM_BASE_URI: ${{ secrets.CMEM_BASE_URI }} | |
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }} | |
run: | | |
task check:pytest | |
- name: safety | |
run: | | |
task check:safety | |
- name: Publish Test Report in Action | |
uses: mikepenz/action-junit-report@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: dist/junit-*.xml | |
- name: Publish Test and Coverage Report as PR comment | |
uses: xportation/junit-coverage-report@main | |
if: github.event_name == 'pull_request' | |
with: | |
junit-path: dist/junit-pytest.xml | |
coverage-path: dist/coverage.xml |