Skip to content

Commit 9e49a35

Browse files
committed
Migrate CI to GitHub Actions
1 parent c3619e5 commit 9e49a35

File tree

2 files changed

+45
-48
lines changed

2 files changed

+45
-48
lines changed

.github/workflows/ci.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
branches-ignore:
4+
- 'master'
5+
pull_request:
6+
schedule:
7+
- cron: '0 4 * * *' # Run at 04:00 every day.
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-16.04
13+
14+
strategy:
15+
matrix:
16+
node-version: [8.x, 9.x, 10.x, 12.x, 13.x]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- run: sudo apt-get install libopus-dev libvpx-dev
25+
- name: Set up environment variables
26+
run: |
27+
# GITHUB_ENV doesn't update the env vars in the current step, so export this one too.
28+
export CACHE_DIR="$HOME/cache"
29+
echo CACHE_DIR="$HOME/cache" >> $GITHUB_ENV
30+
echo CFLAGS="-I$CACHE_DIR/usr/include -O3" >> $GITHUB_ENV
31+
echo LDFLAGS="-L$CACHE_DIR/usr/lib" >> $GITHUB_ENV
32+
echo LD_LIBRARY_PATH="$CACHE_DIR/usr/lib" >> $GITHUB_ENV
33+
echo PKG_CONFIG_PATH="$CACHE_DIR/usr/lib/pkgconfig" >> $GITHUB_ENV
34+
- name: Cache compiled dependencies
35+
uses: actions/cache@v2
36+
with:
37+
path: ${{ env.CACHE_DIR }}
38+
key: ${{ runner.OS }}-${{ hashFiles('tools/install-deps.sh') }}
39+
- run: tools/install-deps.sh
40+
- run: npm install
41+
- run: npm run doc
42+
- run: npm run test
43+
- run: npm run report-coverage
44+
- run: npm run format && git diff --exit-code
45+
if: ${{ matrix.node-version == '13.x' }}

.travis.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)