-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (68 loc) · 2.03 KB
/
build-and-test.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
name: Build and Test
permissions: read-all
on:
push:
branches:
- master
- develop
- gh-actions-test
pull_request:
branches:
- master
- develop
jobs:
build-and-test:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version:
- 18.20.2
- 20.12.1
- 21.7.3
- 22.0.0
EXCALIDRAW_TAG:
- 0.15.0
- https://excalidraw.com
steps:
- name: Generate dynamic matrix hash
id: generate_hash
run: |
MATRIX_VARS=$(echo '${{ toJSON(matrix) }}')
MATRIX_HASH=$(echo -n "$MATRIX_VARS" | md5sum | awk '{print $1}')
echo "MATRIX_HASH=$MATRIX_HASH" >> $GITHUB_ENV
- name: Unique Matrix ID
run: |
GH_ACTION_UNIQUE_ID="${{ github.run_id }}-$MATRIX_HASH"
echo "GH_ACTION_UNIQUE_ID=$GH_ACTION_UNIQUE_ID" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up .nvmrc
run: echo v${{ matrix.node-version }} > .nvmrc
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8.18
- name: Get Dependencies
run: |
sudo apt-get update && sudo apt-get install -y jq
pip install yq
APT_DEPS=$(python -m yq -r -c '.dev | keys | join(" ")' .github/dependencies.yml)
echo "APT_DEPS=${APT_DEPS}" >> $GITHUB_ENV
- name: Install Dependencies (Ubuntu)
run: |
# See project/.github/dependencies.yml for a list of dependencies.
sudo apt-get update && sudo apt-get install -y ${APT_DEPS}
# - name: Install nvm
# run: |
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- name: Run everything
run: |
npm install -g npm@latest
npm install
npx playwright install-deps
npx playwright install firefox
export EXCALIDRAW_INSTANCE_NAME=test-excalidraw-$GH_ACTION_UNIQUE_ID
bash scripts/pre.sh