build: move to hatch #28
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
# Build, test, and run static analyses, and send reports to external services | |
# Runs only on pushing to main | |
name: maintest | |
on: | |
push: | |
branches: [main, master] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
python-version: ["3.11"] | |
name: "test on ${{ matrix.os }}/py${{ matrix.python-version }}" | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: "Set up Python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Install build meta-dependencies | |
run: | | |
pip install hatchling~=1.7 | |
- name: Test with pytest | |
run: | | |
hatch test | |
- name: Update coveralls | |
if: runner.os == 'Linux' | |
run: | | |
pip install 'coveralls~=3.3' | |
coveralls --service=github || true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update codecov | |
if: runner.os == 'Linux' | |
run: | | |
pip install 'codecov~=2.1' | |
codecov || true |