-
-
Notifications
You must be signed in to change notification settings - Fork 255
59 lines (51 loc) · 1.62 KB
/
test-template.yml
File metadata and controls
59 lines (51 loc) · 1.62 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
57
58
59
on:
workflow_call:
inputs:
runner:
required: true
type: string
node-version:
required: true
type: string
container-runtime:
required: true
type: string
workspace:
required: true
type: string
jobs:
test:
name: "Run"
runs-on: ${{ inputs.runner }}
steps:
- name: Code checkout
uses: actions/checkout@v5
- name: Docker rootless setup
if: ${{ inputs.container-runtime == 'docker-rootless' }}
uses: ./.github/actions/docker-rootless-setup
- name: Podman setup
if: ${{ inputs.container-runtime == 'podman' }}
uses: ./.github/actions/podman-setup
- name: Colima setup
if: ${{ inputs.container-runtime == 'colima' }}
uses: ./.github/actions/colima-setup
with:
runner: ${{ inputs.runner }}
- name: Rancher Desktop setup
if: ${{ inputs.container-runtime == 'rancher-desktop' }}
uses: ./.github/actions/rancher-desktop-setup
with:
runner: ${{ inputs.runner }}
- name: Code checkout
uses: actions/checkout@v5
- name: Install Node ${{ inputs.node-version }} and Dependencies
id: npm-install
uses: ./.github/actions/npm-setup
with:
runner: ${{ inputs.runner }}
node-version: ${{ inputs.node-version }}
workspace: "${{ inputs.workspace }}"
- name: Run tests
run: npm run test:ci -- --coverage.include=${{ steps.npm-install.outputs.workspace_path }} ${{ steps.npm-install.outputs.workspace_path }}
env:
CI: true