Skip to content

Commit 7ae67ec

Browse files
committed
Add Github Actions CI & CD
1 parent 0671d38 commit 7ae67ec

7 files changed

Lines changed: 137 additions & 170 deletions

File tree

.github/workflows/main.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [14.x, 16.x, 18.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- run: npm ci
30+
- run: npm run build --if-present
31+
- name: Run all tests
32+
env:
33+
OCTOKIT_TOKEN: ${{ secrets.OCTOKIT_TOKEN }}
34+
AUTH_CLIENT_ID: ${{ secrets.AUTH_CLIENT_ID }}
35+
AUTH_CLIENT_SECRET: ${{ secrets.AUTH_CLIENT_SECRET }}
36+
run: npm test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ out
9292
# Nuxt.js build / generate output
9393
.nuxt
9494
dist
95+
build
9596

9697
# Gatsby files
9798
.cache/

0 commit comments

Comments
 (0)