[pre-commit.ci] pre-commit autoupdate (#78) #342
This file contains hidden or 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 | |
on: | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
push: | |
branches: | |
- main | |
- develop | |
- v* | |
jobs: | |
standard: | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: [ubuntu-latest, windows-latest, macos-latest] | |
python: | |
- 3.8 | |
- 3.9 | |
- '3.10' | |
- '3.11' | |
exclude: | |
# macos-latest is now running on M1 macs | |
- runs-on: macos-latest | |
python: 3.8 | |
- runs-on: macos-latest | |
python: 3.9 | |
- runs-on: macos-latest | |
python: 3.10 | |
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" | |
runs-on: ${{ matrix.runs-on }} | |
if: >- | |
(github.event_name != 'pull_request' | |
|| (github.event_name == 'pull_request' && github.event.pull_request.merged != true)) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get history and tags for SCM versioning to work | |
run: | | |
git fetch --prune --unshallow | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: 'x64' | |
cache: 'pip' | |
cache-dependency-path: '**/setup.cfg' | |
- name: Prepare env | |
run: | | |
python -m pip install -U wheel coveralls | |
- name: Setup annotations on Linux | |
if: runner.os == 'Linux' | |
run: python -m pip install pytest-github-actions-annotate-failures | |
- name: Build and install package | |
run: python -m pip install -e .[test] | |
- name: Run tests | |
run: python -m pytest -v --cov=pylint_secure_coding_standard | |
- name: Coveralls.io | |
run: coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: python-${{ matrix.python }}-${{ matrix.runs-on }}-x64 | |
COVERALLS_PARALLEL: true | |
finish: | |
needs: standard | |
runs-on: ubuntu-latest | |
container: python:3-slim | |
steps: | |
- name: Coveralls Finished | |
run: | | |
pip3 install --upgrade coveralls | |
coveralls --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |