Merge pull request #4 from truefoundry/update-workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
build_test_fe: | |
name: Build and test FE | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install Dependencies | |
run: npm install | |
working-directory: ./frontend | |
- name: Build Project | |
run: npm run build | |
working-directory: ./frontend | |
- name: Archive Production Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: frontend-build | |
path: frontend/dist | |
build_test_be: | |
name : Build and test BE | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.x' | |
- name: setup dist-app directory # required for go build to embed it in the binary | |
run: mkdir frontend/dist-app && touch frontend/dist-app/sample.txt | |
- name: Install | |
run: go get | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... |