Skip to content

ci: djedi-react release workflow #127

ci: djedi-react release workflow

ci: djedi-react release workflow #127

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- uses: pre-commit/action@v2.0.3
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
# - "3.12" # Enable when we get rid of setuptools
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade packaging tools
run: python -m pip install --upgrade pip setuptools virtualenv
- name: Install dependencies
run: python -m pip install --upgrade tox
- name: Run tox targets for ${{ matrix.python-version }}
run: |
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') python -m tox
- uses: actions/upload-artifact@v3
with:
name: coverage-files
path: ./.coverage.*
coverage:
name: Reporting Coverage
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
needs: [tests]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- uses: actions/download-artifact@v3
with:
name: coverage-files
path: .
- name: Combine coverage reports
run: |
python -m pip install coverage
make coverage-lcov
- name: Upload coverage report
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage.info"