-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (40 loc) · 1.25 KB
/
run-tests.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
name: Run Unit Tests
on:
push:
branches:
- 'master'
- 'develop'
pull_request:
branches:
- 'master'
- 'develop'
jobs:
run-tests:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
environment:
name: development
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
# We should see why permissions field is not doing the job. This should be removed
- run: echo "registry=https://registry.yarnpkg.com/" > .npmrc
- run: echo "@internxt:registry=https://npm.pkg.github.com" >> .npmrc
# You cannot read packages from other private repos with GITHUB_TOKEN
# You have to use a PAT instead https://github.com/actions/setup-node/issues/49
- run: echo //npm.pkg.github.com/:_authToken=${{ secrets.PERSONAL_ACCESS_TOKEN }} >> .npmrc
- run: echo "always-auth=true" >> .npmrc
- name: Install dependencies
run: yarn
- name: Run unit tests
run: yarn test