2021-01-07 01:11:33 +08:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2021-02-26 13:15:52 +08:00
|
|
|
push:
|
|
|
|
branches:
|
2021-03-09 14:27:51 +08:00
|
|
|
- main
|
2021-01-07 01:11:33 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
javascript-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: JavaScript tests
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '12'
|
|
|
|
- name: Cache dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-node-
|
|
|
|
- run: npm install
|
|
|
|
- run: npm test
|