-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (41 loc) · 1.38 KB
/
ci.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
name: Node.js CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
env:
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
CONTENTFUL_SPACE: ${{ vars.CONTENTFUL_SPACE }}
CONTENTFUL_ENVIRONMENT: ${{ vars.CONTENTFUL_ENVIRONMENT }}
CONTENTFUL_ENTRY: ${{ vars.CONTENTFUL_ENTRY }}
CONTENTFUL_CONTENT_TYPE: ${{ vars.CONTENTFUL_CONTENT_TYPE }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '20.x']
steps:
- name: 🔐 Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
cdn.contentful.com:443
github.com:443
registry.npmjs.org:443
- name: 🔔 Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: ⚙️ Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
- name: ⚙️ Install dependencies
run: npm ci
- name: ⚙️ Install e2e dependencies
run: npm --prefix __tests__/e2e/import-library/ i __tests__/e2e/import-library/ --no-save
- name: 🧪 Run tests
run: npm run test:ci