From 511efc9fdeaa9bf45f722e5ab331078e88ad947d Mon Sep 17 00:00:00 2001 From: Yewolf Date: Thu, 10 Aug 2023 13:20:28 +0200 Subject: [PATCH] feat(workflow): build front as well --- .github/workflows/build.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9054c3c..c69073f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Go on: [push] jobs: - build: + build-back: runs-on: ubuntu-latest steps: @@ -11,10 +11,27 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.x' - cache-dependency-path: go.sum - - name: Install dependencies + cache-dependency-path: backend/go.sum + - name: Install backend dependencies run: cd backend && go mod download - - name: Build + - name: Build Go binary run: cd backend && go build -v ./... - name: Test with the Go CLI - run: cd backend && go test ./... \ No newline at end of file + run: cd backend && go test ./... + + build-front: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: frontend/package-lock.json + - name: Install front dependencies + run: cd frontend && npm install + - name: Build front + run: cd frontend && npm run build + \ No newline at end of file