This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
Merge pull request #120 from c4dt/archive_update_2 #116
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 and push Docker image | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
jobs: | |
build: | |
name: Lint, build and test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "10" | |
- name: Lint TypeScript | |
run: | | |
cd webapp | |
npm ci | |
npx ng lint | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.17" | |
- name: Lint Go | |
run: | | |
cd backend | |
if test $( gofmt -d . | tee gofmt.results | wc -l ) -ne 0; then cat gofmt.results; exit 1; fi | |
go get -u golang.org/x/lint/golint | |
golint -set_exit_status ./... | |
- name: Setup protobuf C compiler | |
uses: arduino/setup-protoc@v1 | |
with: | |
version: "3.19" | |
- name: Build | |
run: make backend-build webapp-build | |
- name: Test | |
run: make backend-test |