forked from resource-watch/resource-watch
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.84 KB
/
run_tests.yaml
File metadata and controls
70 lines (59 loc) · 1.84 KB
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
63
64
65
66
67
68
69
70
name: Run tests for the base branch
on:
pull_request:
push:
branches:
- master
- preproduction
- develop
jobs:
test:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
strategy:
matrix:
node: [ '14.15', '14', '15' ]
env:
CC_TEST_REPORTER_ID: 1a3b4790c97b84d93856c16cd0ceac7070a43c7620444d9de945c75c2edfa676
CYPRESS_BASE_URL: http://localhost:3000
FAIL_FAST_ENABLED: false
LOGGER_LEVEL: info
NEXT_PUBLIC_ADD_SEARCH_KEY: abcdef1234567890abcdef1234567890
NEXT_PUBLIC_API_ENV: production
NEXT_PUBLIC_APPLICATIONS: rw
NEXT_PUBLIC_BING_MAPS_API_KEY: fakeBingToken
NEXT_PUBLIC_BLOG_API_URL: https://blog.resourcewatch.org/wp-json/wp/v2
NEXT_PUBLIC_CALLBACK_URL: http://localhost:3000/auth
NEXT_PUBLIC_CONTROL_TOWER_URL: https://api.resourcewatch.org
NEXT_PUBLIC_GOOGLE_ANALYTICS: UA-12345678-9
NEXT_PUBLIC_RW_ENV: test
NEXT_PUBLIC_RW_GOGGLE_API_TOKEN_SHORTENER: fakeGoogleApiToken
NEXT_PUBLIC_RW_MAPBOX_API_TOKEN: fakeMapboxToken
NEXT_PUBLIC_WRI_API_URL: https://api.resourcewatch.org
NODE_ENV: test
NODE_OPTIONS: "--max-old-space-size=8192"
PORT: 3000
REDIS_URL: redis://localhost:6379
SECRET: keyboard cat
TEST_ENV: FRONTEND
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
# - name: Start server
# run: yarn start &
- name: Run tests with coverage
uses: paambaati/codeclimate-action@v2.7.5
with:
coverageCommand: yarn cover