Run tests for feature/build-enhancements #234
Workflow file for this run
This file contains hidden or 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: CHECKS-AND-INTEGRATION-TESTS | |
| run-name: Run tests for ${{ github.ref_name }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| - feature/* | |
| jobs: | |
| checks-and-integration-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: CHECK-OUT | |
| uses: actions/checkout@v7 | |
| - name: SETUP GO | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.x" | |
| - name: RUN MIGRATION | |
| run: | | |
| go install -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest | |
| ~/go/bin/migrate -path ./.migrations -database=sqlite3://assets.db up | |
| - name: INSTALL BUN | |
| uses: oven-sh/setup-bun@v2 | |
| - name: INSTALL DEPENDENCIES | |
| run: bun install | |
| - name: RUN STATIC CHECKS | |
| run: bun run check | |
| - name: RUN INTEGRATION TESTS | |
| env: | |
| URL: localhost:4020 | |
| ASSETS_DB: "../../assets.db" | |
| ASSETS_JWT_SECRET: S0meS3cret | |
| ASSETS_APP: /public | |
| ASSETS_PORT: 4020 | |
| run: | | |
| bun run backend:dev & echo $! >/tmp/backend.pid | |
| sleep 1 | |
| bun test | |
| kill -9 $(cat /tmp/backend.pid) |