Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 35 additions & 31 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ concurrency:

jobs:
go-test:
runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: false
cache: true

- name: Go vet
run: go vet ./...
Expand All @@ -33,7 +33,7 @@ jobs:
run: go test ./... -v

go-integration-test:
runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
needs: [e2e-tests]
timeout-minutes: 10
Expand All @@ -52,31 +52,32 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: false
cache: true

- name: Run store integration tests
env:
TEST_DATABASE_URL: postgres://test:test@localhost:${{ job.services.postgres.ports[5432] }}/scaledtest_test?sslmode=disable
run: make test-integration

frontend-build:
runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@v6
with:
node-version: 22
package-manager-cache: false
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: frontend
Expand All @@ -91,17 +92,18 @@ jobs:
run: npx vite build

jest-tests:
runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@v6
with:
node-version: 22
package-manager-cache: false
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: frontend
Expand All @@ -112,24 +114,25 @@ jobs:
run: npm test

go-build:
runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 10
needs: [go-test, frontend-build]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: false
cache: true

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@v6
with:
node-version: 22
package-manager-cache: false
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Build frontend
working-directory: frontend
Expand All @@ -149,7 +152,7 @@ jobs:
run: CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/scaledtest-worker ./cmd/worker

e2e-tests:
runs-on: self-hosted
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 20
services:
Expand All @@ -167,19 +170,20 @@ jobs:
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: false
cache: true

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
uses: actions/setup-node@v6
with:
node-version: 22
package-manager-cache: false
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Build frontend
working-directory: frontend
Expand Down Expand Up @@ -224,17 +228,17 @@ jobs:
--output=test-results

- name: Upload Playwright screenshots
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@v7
if: always()
with:
name: playwright-screenshots
path: e2e/test-results/**/*.png
retention-days: 30

- name: Upload Playwright HTML report
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@v7
if: always()
with:
name: playwright-report
path: e2e/playwright-report/
retention-days: 30
retention-days: 30
Loading