Skip to content

[pre-commit.ci] pre-commit autoupdate #1267

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #1267

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
- '**'
jobs:
cleanup-runs:
runs-on: ubuntu-latest
if: "!startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, 'main')"
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.3
env:
GITHUB_TOKEN: ${{ github.token }}
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
max-parallel: 10
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', 3.11]
exclude:
- platform: ubuntu-latest
python-version: 3.6
- platform: macos-latest
python-version: 3.11
- platform: windows-latest
python-version: 3.6
- platform: windows-latest
python-version: 3.11
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
id: pip-cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.platform }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.platform }}-pip-${{ matrix.python-version }}-
- name: Update branches
run: |
git fetch origin feature/migration-test-01:feature/migration-test-01
git fetch origin feature/migration-test-02:feature/migration-test-02
git fetch origin feature/migration-test-03:feature/migration-test-03
git fetch origin feature/migration-test-04:feature/migration-test-04
git fetch origin feature/migration-test-05:feature/migration-test-05
working-directory: migration_fixer/tests/demo
- name: Install dependencies
run: |
make install-test
- name: Checkout feature/migration-test-01
run: |
git checkout feature/migration-test-01
working-directory: migration_fixer/tests/demo
- name: Run test
run: make tox
continue-on-error: true
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
PLATFORM: ${{ matrix.platform }}
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot' && matrix.python-version == '3.9'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3.1.1
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot' && matrix.python-version == '3.9'
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true