Bumps the github-actions-updates group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/cache](https://github.com/actions/cache), [pnpm/action-setup](https://github.com/pnpm/action-setup) and [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) Updates `actions/cache` from 5 to 6 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v5...v6) Updates `pnpm/action-setup` from 6.0.4 to 6.0.9 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v6.0.4...v6.0.9) Updates `codecov/codecov-action` from 6 to 7 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: pnpm/action-setup dependency-version: 6.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-updates - dependency-name: codecov/codecov-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com>
80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
name: backend
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
tags:
|
|
paths:
|
|
- ".github/workflows/ci-backend.yml"
|
|
- "backend/**"
|
|
- "!backend/scripts/**"
|
|
- "!**.md"
|
|
pull_request:
|
|
types: [opened, reopened]
|
|
paths:
|
|
- ".github/workflows/ci-backend.yml"
|
|
- "backend/**"
|
|
- "!backend/scripts/**"
|
|
- "!**.md"
|
|
|
|
jobs:
|
|
test:
|
|
name: Test & Coverage
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: debug if needed
|
|
run: if [[ "$DEBUG" == "true" ]]; then env; fi
|
|
env:
|
|
DEBUG: ${{secrets.DEBUG}}
|
|
|
|
- name: install go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.25"
|
|
cache-dependency-path: backend
|
|
|
|
- name: test and build backend
|
|
run: |
|
|
go test -race -timeout=60s -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
|
|
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "_mock.go" > $GITHUB_WORKSPACE/profile.cov
|
|
go build -race ./...
|
|
working-directory: backend/app
|
|
env:
|
|
TZ: "America/Chicago"
|
|
|
|
- name: test examples
|
|
run: |
|
|
go test -race ./...
|
|
go build -race ./...
|
|
working-directory: backend/_example/memory_store
|
|
env:
|
|
TZ: "America/Chicago"
|
|
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
version: "v2.10.1"
|
|
working-directory: backend/app
|
|
|
|
- name: golangci-lint on example directory
|
|
uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
version: "v2.10.1"
|
|
args: --config ../../.golangci.yml
|
|
working-directory: backend/_example/memory_store
|
|
|
|
- name: submit coverage
|
|
run: |
|
|
go install github.com/mattn/goveralls@latest
|
|
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
|
|
working-directory: backend
|
|
env:
|
|
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|