-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (41 loc) · 1.38 KB
/
javascript-tests.yml
File metadata and controls
50 lines (41 loc) · 1.38 KB
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
name: JavaScript Tests
on:
push:
branches: [main]
pull_request:
branches:
- "**"
jobs:
javascript-tests:
name: Run JavaScript Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install Latest Firefox
run: |
sudo apt-get purge -y firefox
LATEST_VERSION=$(curl -s https://product-details.mozilla.org/1.0/firefox_versions.json | jq -r '.LATEST_FIREFOX_VERSION')
echo "Latest Firefox version is $LATEST_VERSION"
wget "https://ftp.mozilla.org/pub/firefox/releases/${LATEST_VERSION}/linux-x86_64/en-US/firefox-${LATEST_VERSION}.tar.xz" -O firefox.tar.xz
tar -xJf firefox.tar.xz
sudo mv firefox /opt/firefox
sudo ln -sf /opt/firefox/firefox /usr/bin/firefox
- name: Install Required System Packages
run: |
sudo apt-get update
sudo apt-get install -y libxmlsec1-dev ubuntu-restricted-extras xvfb
- name: Install npm dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run tests
run: npm run test-ci