This repository was archived by the owner on Oct 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (42 loc) · 1.44 KB
/
build.yml
File metadata and controls
52 lines (42 loc) · 1.44 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
name: build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # renovate: tag=v2.3.5
- name: Install dependencies with Yarn
run: yarn install --frozen-lockfile
- name: Lint files
run: yarn lint
- name: Run Jest tests
run: yarn jest --maxWorkers=2 --ci --coverage
- name: Upload coverage
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 # renovate: tag=v2.2.4
if: always()
continue-on-error: true
with:
name: coverage
path: coverage
- name: Codecov
continue-on-error: true
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # renovate: tag=v2.1.0
if: always()
- name: Deploy to Glitch
if: github.ref == 'refs/heads/main'
run: |
if [[ ! -z "$GLITCH_PROJECT_ID" ]] && [[ ! -z "$GLITCH_TOKEN" ]]
then
yarn sync-glitch
else
echo 'missing secrets'
fi
env:
GLITCH_PROJECT_ID: ${{ secrets.GLITCH_PROJECT_ID }}
GLITCH_TOKEN: ${{ secrets.GLITCH_TOKEN }}
GH_REPO: ${{ github.repository }}