-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (38 loc) · 988 Bytes
/
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
name: Tests
on:
push:
paths:
- "src/**"
- "dist/**"
- ".github/**"
- "action.yml"
- "package.json"
- "jest.config.js"
- "package-lock.json"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- uses: actions/cache@v2
id: node-modules-cache
with:
path: "**/node_modules"
key: node-12-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Tests
run: npm run test
- uses: weyheyhey/create-dotenv-action@v1
with:
filename: ".env.production"
env:
^TEST_ENV_ONE: value-one
^TEST_ENV_TWO: value-two
TEST_ENV_THREE: value-three
- name: Read the result
run: cat ./.env.production