Merge pull request #69 from stumpylog/master #32
This file contains 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: Concurrent Log Handler (CLH) tests | |
on: | |
push: | |
branches: | |
- master # or the name of your primary branch | |
pull_request: | |
branches: | |
- master # or the name of your primary branch | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install Hatch | |
run: | | |
pip3 install --upgrade hatch | |
- name: Run linting | |
run: | | |
hatch run lint:all | |
test: | |
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
needs: | |
- lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest] | |
include: | |
- python-version: "3.11" | |
os: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install Hatch | |
run: | | |
pip3 install --upgrade hatch | |
- name: Run tests | |
run: | | |
hatch run test.py${{ matrix.python-version }}:cov | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: pip | |
- name: Install Hatch | |
run: | | |
pip3 install --upgrade hatch | |
- name: Build | |
run: | | |
hatch build --clean | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: dist/* | |
if-no-files-found: error | |
retention-days: 7 | |