Repository navigation
96 lines (96 loc) · 2.73 KB
/
Copy pathe2e.yml
File metadata and controls
96 lines (96 loc) · 2.73 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: E2E
on:
push:
branches:
- main
# pull_request:
# branches:
# - main
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
e2e-run:
runs-on: ${{ matrix.os }}
timeout-minutes: 300
strategy:
matrix:
include:
- name: Ubuntu
os: ubuntu-latest
- name: NixOS
os: ubuntu-latest
- name: MacOS
os: macos-latest
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@v2.0.0
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Relocate Nix Store to /mnt
if: runner.os == 'Linux'
run: make nix-relocate-store
- name: KVM Linux Virtualization
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-x86 libvirt-daemon-system libvirt-clients bridge-utils cpu-checker
kvm-ok || echo "KVM acceleration may not be available"
sudo modprobe kvm
sudo chmod 666 /dev/kvm
sudo systemctl start libvirtd
- name: Setup Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
trusted-users = root runner
system-features = kvm
max-jobs = auto
cores = 0
fallback = true
connect-timeout = 10
download-attempts = 5
- name: Prepare System Files
if: runner.os == 'macOS'
run: |
for file in \
/etc/nix/nix.conf \
/etc/shells \
/etc/bashrc \
/etc/zshrc
do
if [ -e "$file" ]; then
sudo mv "$file" "${file}.before-nix-darwin"
fi
done
- name: Run Install Command
run: |
curl -fsSL https://raw.githubusercontent.com/shunkakinoki/dotfiles/${{ github.sha }}/install.sh | sh
env:
GITHUB_PR: ${{ github.event.pull_request.number }}
NIX_CONFIG_TARGET: ${{ matrix.name == 'NixOS' && 'nixos' || '' }}
e2e-check:
if: always()
needs:
- e2e-run
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Alls Green
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}