From 4350378ce6624796bbea87691480e6c8ecc41561 Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Tue, 5 Jan 2021 18:56:11 -0800 Subject: [PATCH] GitHub Actions: Build --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 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 000000000..05748a955 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: npm install + run: cd webapp; npm install + + - name: ESLint + run: cd webapp; npm run check + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + + - name: Build server + run: make server + + - name: Build webapp + run: cd webapp; npm run pack + + - name: Test server + run: cd server; go test -v ./... + + - name: "Test webapp: Jest" + run: cd webapp; npm run test + + - name: "Test webapp: Cypress" + run: "cd webapp; npm run cypress:ci"