-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (49 loc) · 1.5 KB
/
test-pr.yml
File metadata and controls
51 lines (49 loc) · 1.5 KB
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: 'Build and Test PR'
on:
pull_request:
branches:
- master
concurrency:
# Latest code is always prioritized to run per workflow per branch.
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
build-and-test:
name: 'Poetry: Build and Test'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Install Nix/Cachix'
uses: cachix/install-nix-action@v31.7.0
with:
install_url: https://releases.nixos.org/nix/nix-2.32.0/install
extra_nix_config:
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: k-framework
signingKey: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
skipPush: true
- name: 'Install Python'
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: 'Get uv release'
id: uv_release
run: |
echo uv_version=$(cat deps/uv_release) >> "${GITHUB_OUTPUT}"
- name: 'Install uv'
uses: astral-sh/setup-uv@v7
with:
version: ${{ steps.uv_release.outputs.uv_version }}
- name: 'Run code quality checks'
run: make check
- name: 'Run pyupgrade'
run: make pyupgrade
- name: 'Run unit tests'
run: make cov-unit
- name: 'Kup list works'
run: uv run kup list
- name: 'Build via Nix'
run: nix build