Skip to content

Commit

Permalink
added tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RA341 committed Feb 13, 2025
1 parent ebfc29b commit b140148
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,38 @@ on:
- 'src/**'

jobs:
test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23

- name: Install Dependencies
run: go mod tidy

- name: Run client manager tests
working-directory: src/service/docker
run: go test -v

- name: Run client manager tests
working-directory: src/service/tests
# tests meant for CI
run: |
CI=true go test -v

build-docker:
runs-on: ubuntu-latest
permissions:
packages: write # to be able to publish docker images
needs:
- test
steps:
- uses: actions/checkout@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions src/service/tests/job_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,16 @@ func TestTimeout(t *testing.T) {
}

func Test50Jobs(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("Skipping testing in CI environment")
}
testBatchJobProcessor(t, 50)
}

func Test100Jobs(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("Skipping testing in CI environment")
}
testBatchJobProcessor(t, 100)
}

Expand Down

0 comments on commit b140148

Please sign in to comment.