Fix: version in build workflow #15
Workflow file for this run
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 & Test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-go: | |
name: πΉ Build Go Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout Code | |
uses: actions/checkout@v4 | |
- name: πΉ Set Up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: π¦ Install Go Dependencies | |
run: go mod tidy | |
- name: π οΈ Build Go Project | |
run: go build -o server ./cmd/server/main.go | |
build-vue: | |
name: π Build Vue Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout Code | |
uses: actions/checkout@v4 | |
- name: π Set Up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: π¦ Install Vue Dependencies | |
run: | | |
cd ui | |
npm install | |
- name: π₯οΈ Build Vue Project | |
run: | | |
cd ui | |
npm run build | |
test-go: | |
name: β Run Go Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout Code | |
uses: actions/checkout@v4 | |
- name: πΉ Set Up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: π¦ Install Go Dependencies | |
run: go mod tidy | |
- name: β Run Go Tests with Coverage | |
run: go test ./... -v -coverprofile=coverage.out | |
- name: π Upload Code Coverage Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: go-code-coverage | |
path: coverage.out | |
- name: π Publish Coverage to Coveralls | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverage.out | |
github-token: ${{ secrets.GITHUB_TOKEN }} |