-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (47 loc) · 1.68 KB
/
web-run-test.yml
File metadata and controls
56 lines (47 loc) · 1.68 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
51
52
53
54
55
56
name: Web Test Runner
on:
workflow_call:
inputs:
# Maybe nees node version for matrix?
test_command:
description: 'Enter the NPM command that will run a test'
type: string
test_command_label:
description: 'Enter the Name of this test (for debugging)'
type: string
build_command:
description: 'Enter the NPM command that will build files'
type: string
branch_name:
description: 'branch name to run tests on'
type: string
jobs:
run_test:
name: ${{ inputs.test_command_label }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ inputs.branch_name }}
- name: NPM install
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Run NPM CI
run: npm ci
- name: Run Build
run: ${{ inputs.build_command }}
- name: Install Firefox Latest
uses: browser-actions/setup-firefox@latest
- name: Log Firefox Version
run: firefox --version
- name: Run ${{ inputs.test_command_label }}
run: ${{ inputs.test_command }}
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs