Skip to content

Commit 1e7014c

Browse files
authored
Merge pull request #1733 from cosmos/test-chrome-on-gh
Test Chrome/browsers on GitHub Actions instead of CircleCI
2 parents ed6c188 + 02240c2 commit 1e7014c

File tree

8 files changed

+54
-120
lines changed

8 files changed

+54
-120
lines changed

.circleci/config.yml

Lines changed: 1 addition & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
version: 2.1
22

3-
orbs:
4-
browser-tools: circleci/[email protected]
5-
63
workflows:
74
version: 2
85
workflow:
@@ -14,9 +11,6 @@ workflows:
1411
matrix:
1512
parameters:
1613
simapp: ["simapp47", "simapp50"]
17-
- test-chrome:
18-
requires:
19-
- build
2014

2115
jobs:
2216
build:
@@ -154,110 +148,4 @@ jobs:
154148
./scripts/<< parameters.simapp >>/stop.sh
155149
./scripts/<< parameters.simapp >>/slow_stop.sh
156150
./scripts/wasmd/stop.sh
157-
test-chrome:
158-
machine:
159-
# We can't use a containerized environment since it requires remote docker to start custom containers.
160-
# However, we can't access the remote docker's network from the primary container. This is a
161-
# feature, as documented in https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments
162-
# As a consequence, we cannot use the circleci CLI for this job because "You cannot use the machine
163-
# executor in local jobs." (https://circleci.com/docs/2.0/local-cli/#limitations-of-running-jobs-locally)
164-
#
165-
# Available images: https://circleci.com/developer/machine/image/ubuntu-2004
166-
# Note that ubuntu-2004:202111-02 and above cause checksum issues when installing yarn packages. No idea why.
167-
image: ubuntu-2004:202111-02
168-
resource_class: large
169-
steps:
170-
- browser-tools/install-chrome # Slow because apt update but what can you do 🤷‍
171-
- run:
172-
name: Install Git Large File Storage (LFS)
173-
# In the current image, `sudo apt install git-lfs` requires `sudo apt update` which is too slow
174-
command: |
175-
wget -O "$HOME/git-lfs.deb" https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_2.13.3_amd64.deb/download.deb
176-
sudo dpkg -i "$HOME/git-lfs.deb"
177-
- checkout
178-
- run: # start early for less wait time below
179-
name: Start wasmd
180-
command: ./scripts/wasmd/start.sh
181-
background: true
182-
- run:
183-
name: Start simapp
184-
command: ./scripts/simapp50/start.sh
185-
background: true
186-
- run:
187-
name: Start slow simapp
188-
command: ./scripts/simapp50/slow_start.sh
189-
background: true
190-
- run:
191-
name: Start Tendermint blockchains
192-
command: ./scripts/tendermint/all_start.sh
193-
background: true
194-
- attach_workspace:
195-
at: /tmp/builds
196-
- run:
197-
name: Merge build folders into project (merge with hardlinks)
198-
command: cp --recursive --link /tmp/builds/* .
199-
- run:
200-
# The images comes with preinstalled nvm, which does not work well with non-login shells
201-
name: Uninstall nvm
202-
# Moving to trash is faster than deleting (gvfs-trash is not installed on this image)
203-
command: |
204-
nvm --version && nvm ls
205-
mkdir -p ~/.local/share/Trash && mv "$NVM_DIR" ~/.npm ~/.local/share/Trash
206-
- run:
207-
name: Install nodejs
208-
command: |
209-
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
210-
sudo apt-get install -y nodejs
211-
- run:
212-
name: Install yarn
213-
command: |
214-
wget -O "$HOME/yarn.deb" https://dl.yarnpkg.com/debian/pool/main/y/yarn/yarn_1.22.15_all.deb
215-
sudo dpkg -i "$HOME/yarn.deb"
216-
- run:
217-
name: Version information
218-
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
219-
- run:
220-
name: Install libusb
221-
# In the current image, `sudo apt install libusb-1.0-0-dev` requires `sudo apt update` which is too slow
222-
command: |
223-
wget -O "$HOME/libusb.deb" http://de.archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0-dev_1.0.23-2build1_amd64.deb
224-
sudo dpkg -i "$HOME/libusb.deb"
225-
- run:
226-
name: Install libudev-dev
227-
# See https://packages.ubuntu.com/focal/libudev-dev (Ubuntu 20.04)
228-
command: |
229-
wget -O "$HOME/libudev1.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_245.4-4ubuntu3.20_amd64.deb
230-
wget -O "$HOME/libudev-dev.deb" http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_245.4-4ubuntu3.20_amd64.deb
231-
sudo dpkg -i "$HOME/libudev1.deb"
232-
sudo dpkg -i "$HOME/libudev-dev.deb"
233-
- run:
234-
name: Install Dependencies
235-
command: yarn install --immutable --immutable-cache --check-cache
236-
- run:
237-
name: Initialize wasmd (deploy contracts and friends)
238-
command: ./scripts/wasmd/init.sh
239-
- run:
240-
name: Start socket server
241-
command: ./scripts/socketserver/start.sh
242-
- run:
243-
name: Start http server
244-
command: ./scripts/httpserver/start.sh
245-
- run:
246-
environment:
247-
HTTPSERVER_ENABLED: 1
248-
SIMAPP50_ENABLED: 1
249-
SLOW_SIMAPP50_ENABLED: 1
250-
TENDERMINT_ENABLED: 1
251-
SOCKETSERVER_ENABLED: 1
252-
SKIP_BUILD: 1
253-
WASMD_ENABLED: 1
254-
command: yarn test-chrome
255-
- run:
256-
name: Stop chains
257-
command: |
258-
./scripts/httpserver/stop.sh
259-
./scripts/socketserver/stop.sh
260-
./scripts/tendermint/all_stop.sh
261-
./scripts/simapp50/stop.sh
262-
./scripts/simapp50/slow_stop.sh
263-
./scripts/wasmd/stop.sh
151+

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
jobs:
1010
# format-text and format-shell in one job to ensure we don't require multiple fix commits and CI re-runs
1111
format:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/checkout@v4
1515
with:

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
analyze:
1313
name: Analyze
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
permissions:
1616
actions: read
1717
contents: read

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
test-with-coverage:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- uses: actions/checkout@v4
1313
with:

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build-and-deploy:
1010
permissions:
1111
contents: write
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/checkout@v4
1515
with:

.github/workflows/faucet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
jobs:
1212
build-and-push-image:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
1515
permissions:
1616
contents: read

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
lint:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
steps:
1616
- uses: actions/checkout@v4
1717
with:

.github/workflows/test.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,57 @@ on:
66
branches: [ "main" ]
77

88
jobs:
9+
test-chrome:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
lfs: true
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "22"
20+
cache: 'yarn'
21+
22+
- name: Start wasmd
23+
run: RUNNER_TRACKING_ID="" && ./scripts/wasmd/start.sh &
24+
- name: Start simapp
25+
run: RUNNER_TRACKING_ID="" && ./scripts/simapp50/start.sh &
26+
- name: Start slow simapp
27+
run: RUNNER_TRACKING_ID="" && ./scripts/simapp50/slow_start.sh &
28+
- name: Start Tendermint blockchains
29+
run: RUNNER_TRACKING_ID="" && ./scripts/tendermint/all_start.sh &
30+
- name: Start socket server
31+
run: RUNNER_TRACKING_ID="" && ./scripts/socketserver/start.sh &
32+
- name: Start http server
33+
run: RUNNER_TRACKING_ID="" && ./scripts/httpserver/start.sh &
34+
35+
- name: Install dependencies
36+
run: yarn install --immutable --immutable-cache --check-cache
37+
38+
- name: Build
39+
run: yarn build
40+
41+
- name: Initialize wasmd (deploy contracts and friends)
42+
run: ./scripts/wasmd/init.sh
43+
44+
- name: Test
45+
env:
46+
HTTPSERVER_ENABLED: 1
47+
SIMAPP50_ENABLED: 1
48+
SLOW_SIMAPP50_ENABLED: 1
49+
TENDERMINT_ENABLED: 1
50+
SOCKETSERVER_ENABLED: 1
51+
SKIP_BUILD: 1
52+
WASMD_ENABLED: 1
53+
run: yarn test-chrome
54+
955
test:
1056
strategy:
1157
matrix:
1258
node-version: ["20", "22", "24"]
13-
runs-on: ubuntu-latest
59+
runs-on: ubuntu-24.04
1460
steps:
1561
- uses: actions/checkout@v4
1662
with:

0 commit comments

Comments
 (0)