-
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.4 KB
/
continuous-integration-workflow.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: Continuous Integration
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: "12.x"
# As part of this, we have to copy loom-common's `package.json` to its `out` folder.
# This is needed because lerna expects loom-common/out to be an npm package (which it only is if it has a package.json file)
# Normally, this is done as part of the build process, but it also needs to be done for a fresh install.
- name: Install dependencies
run: |
mkdir -p loom-common/out
cp loom-common/package.json loom-common/out
npm install
- name: Lint
run: npm run lint
# This step has two purposes:
# 1. Typecheck everything by putting it through tsc
# 2. Build loom-common, which is needed by loom-editor and loom-extension tests
- name: Typecheck and Build
run: npm run build
- name: Tests
run: npm run test
# This only gets run if we're pushing a new tag that starts with "v"
- name: Publish
if: success() && startsWith(github.ref, 'refs/tags/v')
run: npm run publish
env:
VSCE_PAT: ${{ secrets.VSCE_DEPLOY_KEY }}