fix up dev workflow #44
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
# Run tests and linting | |
name: Dev (formatting, tests, dev docs) | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "test" | |
test: | |
# The type of runner that the job will run on | |
strategy: | |
matrix: | |
python-versions: [3.11, 3.12] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Get repo | |
uses: actions/checkout@v2 | |
- name: Checkout gh-pages branch (for docs) | |
run: | | |
git fetch origin gh-pages --depth=1 | |
- name: List files | |
run: ls -l . | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-versions }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Find tox | |
run: poetry run tox --version | |
- name: Run tox (includes tests, format, lint, docs) | |
run: poetry run tox -vv | |
- name: Configure git for github-actions[bot] | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Build versioned docs with mike | |
run: | | |
poetry run mike deploy --push --update-aliases dev | |
poetry run mike set-default stable --push |