-
Notifications
You must be signed in to change notification settings - Fork 6
83 lines (64 loc) · 2.17 KB
/
tests.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Tests
on: [push]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12, macos-13 ]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Linux requirements
if: runner.os == 'Linux'
run: |
sudo apt update --yes
sudo apt install libnss3-tools
- name: Set up Homebrew
if: runner.os == 'macOS'
uses: Homebrew/actions/setup-homebrew@master
- name: Install homebrew dependencies
if: runner.os == 'macOS'
run: |
set -x
sudo chmod ugo+w /usr/local/bin
brew install -q docker docker-compose lima mkcert nss
- name: Install and start Colima
if: runner.os == 'macOS'
run: |
brew install -q colima
colima version
colima start --cpu 3 --memory 6 --disk 100 --mount-type=sshfs --dns=1.1.1.1
sudo security authorizationdb write com.apple.trust-settings.admin allow
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Show debug info
run: |
make debug
make ping
- name: Start up Stonehenge
run: make up
- name: Ping docker.so should resolve to 127.0.0.1 now
run: make ping
- name: Check that DNS works when curling Google. Expecting HTTP/2 200
run: curl -Is https://www.google.com | head -1
- name: Check if Traefik can be accessed from traefik.docker.so
run: |
printf "CURL traefik.docker.so for checking access starts"
until curl -s "https://traefik.docker.so/dashboard/#/" | grep -o "<title>Traefik[^<]*" | tail -c+8; do true; done > /dev/null
printf "CURL traefik.docker.so for checking access ends"
- name: Tear down Stonehenge
run: make down
- name: Turn off colima
if: runner.os == 'macOS'
run: colima stop
- name: Clean up Homebrew
if: runner.os == 'macOS'
continue-on-error: true
run: |
brew update
brew autoremove
brew cleanup