Skip to content

ci: restore codeql.yml #9

ci: restore codeql.yml

ci: restore codeql.yml #9

Workflow file for this run

name: Quality
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
schedule:
- cron: '0 12 5 * *'
jobs:
check_pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements-dev.txt
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
check_coverage:
runs-on: ubuntu-latest
needs: [check_pylint]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
env:
GCLOUD_DNS_JSON: '${{ secrets.GCLOUD_DNS_JSON }}'
steps:
- uses: actions/checkout@v3
- name: Install simple_acme_dns package with dev dependencies
run: |
python3 -m pip install .
python3 -m pip install -r requirements-dev.txt
- name: Test simple_acme_dns package to ensure 100% coverage
run: |
python3 -m coverage run --module unittest simple_acme_dns/tests/test_*
python3 -m coverage report --show-missing --fail-under 100
check_codeql:
runs-on: ubuntu-latest
needs: [check_coverage]
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2