From 34f502c166dba5e1f90413d8cd2ef32485255f1a Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 10 Jun 2021 12:22:04 +0800 Subject: [PATCH] Add test and build actions Signed-off-by: Yukai Huang --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..ea8420fa --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: 'Test and Build' + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + test-and-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - uses: actions/setup-node@v2 + with: + node-version: '12' + check-latest: true + + - run: npm ci + - run: npm run test:ci + - run: npm run build