-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (47 loc) · 1.91 KB
/
ubuntu-pr.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
name: '2.x: Ubuntu - Test image builds on PR'
on:
pull_request:
types:
- opened
branches:
- 2.x
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: '2.x'
- name: Install modules
run: yarn install --production=false --global
- name: Pack the JS
run: yarn oclif pack tarballs --targets=linux-x64,linux-arm,linux-arm64,darwin-x64,darwin-arm64 --no-xz
- name: Rename the dist/* files
run: yarn renamedist
# We build mkcert from source because releases are broken
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full libnss3-tools wget
cd /tmp
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
mkdir -p ~/.config/ce-dev
touch ~/.config/ce-dev/preferences-2.x.yml
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
- name: Build ce-dev and ce-dev-controller
run: |
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev --dockerfile-path base
/bin/sh docker-images/export.sh --version 2.x --image-name ce-dev-controller --dockerfile-path controller
- name: Testing templates
run: |
sudo chmod +x bin/run.js
/bin/sh templates/prebuild.sh --template ce-dev.compose.yml