Skip to content

Introduce holiday snapshots (#1478) #2872

Introduce holiday snapshots (#1478)

Introduce holiday snapshots (#1478) #2872

Workflow file for this run

name: Tests
on: [merge_group, push, pull_request, workflow_dispatch]
env:
FORCE_COLOR: 1
jobs:
pre-commit:
name: Run Quality Assurance
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v4.7.0
with:
python-version: '3.11'
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
test:
name: 'Test: Python=${{ matrix.python-version }} on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
needs: [pre-commit]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8']
steps:
- uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.0
with:
cache: pip
cache-dependency-path: |
requirements/runtime.txt
requirements/tests.txt
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install .
- name: Run Tests
run: |
make test
- name: Upload Coverage
uses: coverallsapp/github-action@v2
with:
flag-name: tests-${{ matrix.python-version }}-${{ matrix.os }}
parallel: true
path-to-lcov: coverage.lcov
build:
name: Build Distribution
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v4.7.0
with:
cache: pip
cache-dependency-path: requirements/runtime.txt
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build polib
pip install .
- name: Build Distribution
run: |
make package
- name: Upload Package Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
coveralls:
name: Finish Coveralls
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
deploy:
name: Deploy
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: [build]
steps:
- name: Get Package Artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Publish Package
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.pypi_password }}