-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.32 KB
/
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
45
46
47
48
49
50
name: Unit Tests
on:
push:
branches: [ "master", "dev" ]
paths:
- "**.ts"
- "package.json"
- "package-lock.json"
- "tsconfig.json"
- ".github/workflows/tests.yml"
pull_request:
branches: [ "master", "dev" ]
paths:
- "**.ts"
- "package.json"
- "package-lock.json"
- "tsconfig.json"
- ".github/workflows/tests.yml"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
- name: Get Tumblr access token
id: auth
uses: MarkSuckerberg/[email protected]
with:
secrets-token: ${{ secrets.SECRETS_ACCESS_TOKEN }}
tumblr-refresh-token: ${{ secrets.TUMBLR_REFRESH_TOKEN }}
tumblr-client-id: ${{ secrets.TUMBLR_CLIENT_ID }}
tumblr-client-secret: ${{ secrets.TUMBLR_CLIENT_SECRET }}
token-name: TUMBLR_REFRESH_TOKEN
user-agent: "Typeble-Auth/1.1.0"
- run: npm ci
- run: npm run lint
- run: npm run test:ci -- --coverage
env:
TUMBLR_TOKEN: ${{ steps.auth.outputs.tumblr-token }}
CONSUMER_ID: ${{ secrets.TUMBLR_CLIENT_ID }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3