Bumps the github-actions-updates group with 5 updates: | Package | From | To | | --- | --- | --- | | [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) | `3` | `6` | | [pnpm/action-setup](https://github.com/pnpm/action-setup) | `2.4.0` | `4.0.0` | | [actions/cache](https://github.com/actions/cache) | `3` | `4` | | [andresz1/size-limit-action](https://github.com/andresz1/size-limit-action) | `7313b26c76b3666c1dc41e2ca05370e201a9b7de` | `94bc357df29c36c8f8d50ea497c3e225c3c95d1d` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `2` | `4` | Updates `golangci/golangci-lint-action` from 3 to 6 - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v6) Updates `pnpm/action-setup` from 2.4.0 to 4.0.0 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v2.4.0...v4.0.0) Updates `actions/cache` from 3 to 4 - [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/v3...v4) Updates `andresz1/size-limit-action` from 7313b26c76b3666c1dc41e2ca05370e201a9b7de to 94bc357df29c36c8f8d50ea497c3e225c3c95d1d - [Release notes](https://github.com/andresz1/size-limit-action/releases) - [Commits](https://github.com/andresz1/size-limit-action/compare/7313b26c76b3666c1dc41e2ca05370e201a9b7de...94bc357df29c36c8f8d50ea497c3e225c3c95d1d) Updates `actions/upload-artifact` from 2 to 4 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v4) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: pnpm/action-setup dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: andresz1/size-limit-action dependency-type: direct:production dependency-group: github-actions-updates - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com>
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
name: backend
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
tags:
|
|
paths:
|
|
- ".github/workflows/ci-test-backend.yml"
|
|
- "backend/**"
|
|
- "!backend/scripts/**"
|
|
- "!**.md"
|
|
pull_request:
|
|
types: [opened, reopened]
|
|
paths:
|
|
- ".github/workflows/ci-test-backend.yml"
|
|
- "backend/**"
|
|
- "!backend/scripts/**"
|
|
- "!**.md"
|
|
jobs:
|
|
test:
|
|
name: Test & Coverage
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: debug if needed
|
|
run: if [[ "$DEBUG" == "true" ]]; then env; fi
|
|
env:
|
|
DEBUG: ${{secrets.DEBUG}}
|
|
|
|
- name: install go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.21"
|
|
|
|
- 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@v6
|
|
with:
|
|
version: v1.58
|
|
working-directory: backend/app
|
|
|
|
- name: golangci-lint on example directory
|
|
uses: golangci/golangci-lint-action@v6
|
|
with:
|
|
version: v1.58
|
|
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 }}
|