-
Notifications
You must be signed in to change notification settings - Fork 46
54 lines (44 loc) · 1.19 KB
/
test.yml
File metadata and controls
54 lines (44 loc) · 1.19 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
name: Run Docker build and tests
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
- prod
permissions:
contents: read
packages: read
jobs:
test:
name: Run tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'
scope: '@clearlydefined'
- name: Configure npm credentials
run: |
echo "//npm.pkg.github.com/:_authToken=${{ github.token }}" >> .npmrc
echo "@clearlydefined:registry=https://npm.pkg.github.com" >> .npmrc
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
docker-build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Configure Docker build credentials
run: |
echo "//npm.pkg.github.com/:_authToken=${{ github.token }}" >> .npmrc
echo "@clearlydefined:registry=https://npm.pkg.github.com" >> .npmrc
- name: Docker build
run: docker build .