Skip to content

Testing some updates to workflow to see if it can run any tests #138

Testing some updates to workflow to see if it can run any tests

Testing some updates to workflow to see if it can run any tests #138

Workflow file for this run

name: Pull request checks
on: [pull_request]
env:
cache-version: "cache-v1"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
build-environment:
needs: pre-commit
strategy:
max-parallel: 10
matrix:
environment: [py310, py311, py312, py313]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Build and test
steps:
- uses: actions/checkout@v4
name: Checkout repository
- name: Setup Pixi Environment
uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
pixi-version: v0.39.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
- name: Test build, unit tests and docs
run: |
pixi run -e ${{ matrix.environment }} test
pixi run -e ${{ matrix.environment }} mkdocs
# https://www.bradmcgonigle.com/blog/github-action-for-continuous-deployment
# - NETLIFY_SITE_ID maps to the netlify site's API ID
# - NETLIFY_AUTH_TOKEN maps to netlify's Personal Access Token that I set on a per-user basis
netlify-deploy:
needs: build-environment
runs-on: ubuntu-latest
steps:
- name: Deploy to Netlify
uses: netlify/actions/cli@master
with:
args: deploy --site ${{ secrets.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --dir=site/