-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathreusable-build-project-workflow.yaml
More file actions
55 lines (55 loc) · 1.68 KB
/
reusable-build-project-workflow.yaml
File metadata and controls
55 lines (55 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
name: "Reusable Build Project Workflow"
on:
workflow_call:
inputs:
spec:
type: string
required: false
description: "Comma delimited test spec file(s) to run."
verbose:
type: boolean
required: false
default: false
description: "Enable verbose Berg logging"
jobs:
build_project_job:
name: "Build Project"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout project"
uses: actions/checkout@v4
- name: "Setup NodeJS"
uses: actions/setup-node@v4
with:
node-version: "22"
- name: "Setup JDK"
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: "17"
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- name: Install Firefox
uses: browser-actions/setup-firefox@v1
with:
firefox-version: "latest-esr"
- name: "Run npm install"
run: "npm install"
- name: "Run compile"
run: "npm run compile"
- name: "Run all tests"
if: "${{ github.event.inputs.spec == '' }}"
env:
TESTCONTAINERS_RYUK_DISABLED: true
BERG_VERBOSE: ${{ inputs.verbose }}
DEBUG: ${{ inputs.verbose && 'testcontainers*' || '' }}
run: "npm run test:compiled"
- name: "Run specific test"
if: "${{ github.event.inputs.spec != '' }}"
env:
TESTCONTAINERS_RYUK_DISABLED: true
BERG_VERBOSE: ${{ inputs.verbose }}
DEBUG: ${{ inputs.verbose && 'testcontainers*' || '' }}
run: "npm run test:compiled -- --specs=${{ inputs.spec }}"