generated from adobecom/milo-college
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1010 Bytes
/
run-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
name: Tests and Linting
on:
push:
branches: [ "main", "stage" ]
pull_request:
types: [opened, synchronize, reopened, edited]
branches: [ "main", "stage" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install XVFB
run: sudo apt-get install xvfb
- name: Install dependencies
run: npm ci
- name: Run linters
run: npm run lint
- name: Run the tests
run: xvfb-run -a npm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: adobecom/express-milo
files: coverage/lcov.info