Skip to content

BEDS-1195 / e2e github actions pipeline changes #1203

BEDS-1195 / e2e github actions pipeline changes

BEDS-1195 / e2e github actions pipeline changes #1203

name: Backend-Integration-Test
on:
push:
paths:
- 'backend/**'
branches:
- main
- staging
pull_request:
paths:
- 'backend/**'
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
checks: write
jobs:
build:
name: integration-test
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: backend/go.mod
cache-dependency-path: backend/go.sum
cache: true
# we clean cache for Self-Hosted runners only
- name: Cleanup
run: |
sudo rm -rf ~/go/pkg/mod ~/.cache/go-build
- name: Cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: go-${{ runner.os }}-${{ hashFiles('backend/go.sum') }}
restore-keys: |
go-${{ runner.os }}-
- name: Tests
working-directory: backend
run:
go install github.com/swaggo/swag/cmd/swag@latest && swag init --ot json -o ./pkg/api/docs -d ./pkg/api/ -g ./handlers/public.go
go test -failfast ./pkg/api/... -config "${{ secrets.CI_CONFIG_PATH }}"