Skip to content

build(deps): bump actions/checkout from 3.6.0 to 4.1.0 #140

build(deps): bump actions/checkout from 3.6.0 to 4.1.0

build(deps): bump actions/checkout from 3.6.0 to 4.1.0 #140

Workflow file for this run

name: Python CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 15 * * 0"
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
permissions: # for EnricoMi/publish-unit-test-result-action
checks: write
pull-requests: write # for comment_mode
contents: read # only for private repository
issues: read # only for private repository
strategy:
matrix:
python-version: ["3.10"]
poetry-version: ["1.2.2"]
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Setup python environment
uses: ./.github/actions/python-setup
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ matrix.poetry-version }}
- name: Lint python code by flake8
continue-on-error: true
run: poetry run flake8 src/ tests/ --format junit-xml --output-file report.xml
- name: Lint python code by flake8
continue-on-error: true
run: poetry run flake8 src/ tests/ --format html --htmldir=flake8
- name: Publish flake8 report to PR
uses: EnricoMi/publish-unit-test-result-action@283dea176069279a9076e77b548668a8e4f0c31b
with:
check_name: flake8 results
junit_files: report.xml
- name: Upload flake8 report to artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: flake8-report
path: flake8/
- name: Test python code by pytest
continue-on-error: true
run: poetry run pytest
- name: Publish pytest report to PR
uses: EnricoMi/publish-unit-test-result-action@283dea176069279a9076e77b548668a8e4f0c31b
with:
check_name: pytest results
junit_files: report.xml
- name: Upload pytest coverage report to artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: pytest-cov-report
path: htmlcov/
- name: Upload pytest report to artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: pytest-report
path: report.html
- name: Upload coverage to codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
verbose: true
sast-codeql:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["python"]
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a
with:
languages: ${{ matrix.language }}
- name: Build automatically
uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a