Skip to content

Building it..

Building it.. #332

Workflow file for this run

---
name: app
on:
push:
pull_request:
branches: [ main ]
defaults:
run:
working-directory: ./app
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: true
experimental: true
- uses: actions/setup-go@v5
with:
go-version: '1.23.4'
cache-dependency-path: 'app/go.sum'
- run: go mod tidy
- run: task gen
- name: Save task cache
uses: actions/cache/save@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- name: Check git status
run: if [[ -n $(git status --porcelain) ]]; then git status --porcelain && exit 1; fi
lint:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore task cache
uses: actions/cache/restore@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: false
- uses: actions/setup-go@v5
with:
go-version: '1.23.4'
cache-dependency-path: 'app/go.sum'
- uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
working-directory: ./app
args: --path-prefix=./
test:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore task cache
uses: actions/cache/restore@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: false
- uses: actions/setup-go@v5
with:
go-version: '1.23.4'
cache-dependency-path: 'app/go.sum'
- run: task test
build:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore task cache
uses: actions/cache/restore@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: false
- uses: actions/setup-go@v5
with:
go-version: '1.23.4'
cache-dependency-path: 'app/go.sum'
- run: task build