-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.67 KB
/
ci.yml
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
name: CI
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: nix develop -c cargo build
- name: Run tests
run: |
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
nix develop -c docker compose up cache db -d
nix develop -c cargo run --package migration up
nix develop -c cargo test
nix develop -c docker compose up -d
cd client
nix develop -c npm i
nix develop -c npm run build
nix develop -c npm run test
- name: Upload cypress e2e results
uses: actions/upload-artifact@v4
with:
name: "cypress-results"
path: "client/cypress/videos"
if-no-files-found: "error"
retention-days: 90
compression-level: 0
overwrite: true