Skip to content

[dependency]: Bump mypy from 1.10.0 to 1.11.0 #236

[dependency]: Bump mypy from 1.10.0 to 1.11.0

[dependency]: Bump mypy from 1.10.0 to 1.11.0 #236

Workflow file for this run

---
name: Python package checks
on: # yamllint disable-line rule:truthy
push:
branches-ignore:
- master
- main
env:
SRC_SSH_PRIVATEKEY_ABS_PATH: /tmp/.ssh/id_rsa_actions_template_sync
jobs:
style:
name: Checks code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Check style
run: |
tox -e style
typing:
name: Checks types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Checks typping
run: |
tox -e typing
unittests:
name: Runs unittests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
versions: ["3.7", "3.8", "3.9", "3.10"]
needs:
- style
- typing
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.versions }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.versions }}
- name: Install tox
run: pip install tox
- name: Test with pytest
run: |
tox -e unittests
documentation:
name: Build documentation
runs-on: ubuntu-latest
needs:
- style
- typing
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Build documentation
run: |
tox -e documentation
- name: Archive documentation
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: documentation
path: build/sphinx/html/
execute:
name: Check terminal program
runs-on: ubuntu-latest
needs:
- unittests
strategy:
fail-fast: false
matrix:
versions: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.versions }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.versions }}
- name: Install tox
run: pip install tox
- name: Run console program
run: |
tox -e execute
integration:
name: Integration tests
runs-on: ubuntu-latest
needs:
- execute
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Run console program
run: |
tox -e integration
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
issues: write
pull-requests: write
needs:
- execute
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: MegaLinter
id: ml
uses: megalinter/megalinter@v6
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
megalinter-reports
analyze:
name: CodeQL Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "python"
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
prepare_synchronization:
name: Check synchronization environment
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checks synchronization environment
run: |
test "${{ secrets.SOURCE_REPO_SSH_PRIVATE_KEY }}" != ""
synchronization:
name: Synchronization with template
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
needs:
- prepare_synchronization
continue-on-error: true
strategy:
fail-fast: false
matrix:
repo:
- "git@github.com:rafyco/template-python-package.git"
env:
TEMPLATE_BRANCH: main
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ssh keys preparation
run: |
mkdir -p /tmp/.ssh
echo "${{ secrets.SOURCE_REPO_SSH_PRIVATE_KEY }}" > "${SRC_SSH_PRIVATEKEY_ABS_PATH}"
chmod 600 "${SRC_SSH_PRIVATEKEY_ABS_PATH}"
- name: Check synchronization
uses: rafyco/synchronized-with@main
with:
ssh_privatekey: ${SRC_SSH_PRIVATEKEY_ABS_PATH}
remote_repo: ${{ matrix.repo }}