-
Notifications
You must be signed in to change notification settings - Fork 33
38 lines (32 loc) · 943 Bytes
/
test.yml
File metadata and controls
38 lines (32 loc) · 943 Bytes
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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Merge main into PR branch
if: github.event_name == 'pull_request'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git fetch origin main
if ! git merge origin/main; then
echo "Merge failed due to conflicts. Please rebase your branch on main."
exit 1
fi
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run checks
run: nix flake check --log-format bar-with-logs