-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (52 loc) · 1.42 KB
/
reusable-test-policy-assemblyscript.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
name: Tests and linters
on:
workflow_call:
inputs:
artifacthub:
description: 'check artifacthub-pkg.yml for submission to ArtifactHub'
required: false
type: boolean
default: true
secrets: {}
jobs:
unit-tests:
runs-on: ubuntu-latest
env:
NODE_VERSION: 14
steps:
-
uses: actions/checkout@v4
-
name: Setup node
uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'
-
name: Install npm
run: npm install
-
name: Run unit-tests
run: |
make test
check-artifacthub:
if: ${{ inputs.artifacthub }}
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
with:
# until https://github.com/actions/checkout/pull/579 is released
fetch-depth: 0
-
name: Install kwctl
uses: kubewarden/github-actions/kwctl-installer@v3.3.5
-
id: calculate-version
run: echo "version=$(git describe --tags --abbrev=0 | cut -c2-)" >> $GITHUB_OUTPUT
shell: bash
-
name: Check that artifacthub-pkg.yml is up-to-date
uses: kubewarden/github-actions/check-artifacthub@v3.3.5
with:
version: ${{ steps.calculate-version.outputs.version }}
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then