-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (47 loc) · 1.31 KB
/
tests.yaml
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
60
61
62
name: 'Tests'
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 6 * * 1-5" # At 06:00 AM, Monday through Friday
permissions:
id-token: write
contents: read
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get Node.js version
id: nvm
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ vars.DEV_NETWORK_AWS_ACCOUNT_ID }}:role/github
role-session-name: ${{ github.event.repository.name }}
aws-region: us-west-2
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Install packages
run: npm ci
- name: Check code style
run: npm run lint
- name: Build packages
run: npm run build
- name: Check types
run: npm run check-types:ci
- name: Run integration tests
run: npm run test:ci