-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (47 loc) · 1.86 KB
/
push.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
51
52
53
54
55
56
57
name: Push - Single Build & Test (on push)
# workflow is for a branch push only and ignores master.
# push to master (which is also pull request merge) has a more elaborate workflow to run
# github repo is configured with branch protection on master.
on:
push:
branches-ignore:
- 'master'
# any branch with a name ending in -no-action will not trigger this workflow.
- '*-no-action'
workflow_dispatch:
inputs:
node:
required: false
description: 'A node version (e.g 10.16.0)'
default: '14' # TODO: update to 16 when support is added
jobs:
build-single-test:
name: Build Single Test
runs-on: ubuntu-latest # environment job will run in
env:
APPOPTICS_SERVICE_KEY: ${{ secrets.APPOPTICS_SERVICE_KEY }}
APPOPTICS_COLLECTOR: ${{ secrets.APPOPTICS_COLLECTOR }}
AO_TEST_PROD_SERVICE_KEY: ${{ secrets.AO_TEST_PROD_SERVICE_KEY }}
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v2
- name: Setup Node ${{ github.event.inputs.node || '14' }}
uses: actions/setup-node@v2
with:
node-version: ${{ github.event.inputs.node || '14' }}
- name: Show Environment Info
run: |
printenv
node --version
npm --version
cat /etc/os-release
# must install specific dependencies before a build
# can't call npm install. doing so may fallback-to-build if package has yet to be published (double build)
# use npm workaround specifying a package name to bypass install script in package.json
- name: NPM Install dependencies
run: npm install linux-os-info --unsafe-perm
# runs: node setup-liboboe.js && node-pre-gyp install --build-from-source
- name: NPM Install with Rebuild from source
run: npm run rebuild
- name: Run tests
run: npm test