-
-
Notifications
You must be signed in to change notification settings - Fork 50
62 lines (57 loc) · 1.56 KB
/
e2e.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: E2E Tests
on:
push:
branches: ["nightly"]
pull_request:
branches: ["nightly"]
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/nightly' }}
env:
CARGO_TERM_COLOR: always
jobs:
ubuntu_e2e_test:
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
# Clone project
- uses: actions/checkout@v4
# Install buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
# Set buildx cache
- name: Cache register
uses: actions/cache@v4
with:
path: ~/buildx-cache
key: buildx-cache
# Install cargo make
- uses: davidB/rust-cargo-make@v1
- name: Install bats
run: |
sudo apt-get update
sudo apt-get install -y bats
# Build nightly image and install nanocl
- name: Prepare CI
run: |
sh ./scripts/build_images.sh
NANOCL_CHANNEL=nightly cargo build --release --bin nanocl
sudo cp target/release/nanocl /usr/bin/nanocl
sudo chmod +x /usr/bin/nanocl
sudo groupadd nanocl
sudo usermod -aG nanocl $USER
newgrp nanocl
nanocl install -t installer.yml
sleep 20
docker ps -a
docker logs ndaemon.system.c
sudo chmod -R 777 /var/lib/nanocl
sudo chmod -R 777 /run/nanocl
nanocl version
# Run E2E tests
- name: E2E
run: |
bats ./tests/e2e.bats