-
Notifications
You must be signed in to change notification settings - Fork 87
51 lines (45 loc) · 1.53 KB
/
pr-checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Pull request checks
on: [pull_request]
env:
cache-version: "cache-v2"
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: false
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/