From db7a5ac0eda9ce864382c6f84469d72dfda27642 Mon Sep 17 00:00:00 2001 From: Liam Beckman Date: Tue, 1 Oct 2024 12:11:48 -0700 Subject: [PATCH] debug: Slurm Github Action workflow --- .github/workflows/compliance.yaml | 4 +- .github/workflows/hugo.yml | 3 +- .github/workflows/tests.yaml | 225 +++++++++++++++--------------- tests/slurm/slurm_test.go | 13 +- 4 files changed, 126 insertions(+), 119 deletions(-) diff --git a/.github/workflows/compliance.yaml b/.github/workflows/compliance.yaml index 0c7676e0a..07cd910fb 100644 --- a/.github/workflows/compliance.yaml +++ b/.github/workflows/compliance.yaml @@ -25,7 +25,9 @@ name: Compliance Test on: push: - pull_request: + branches: + - main + # pull_request: jobs: build: diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 81986c025..87816ef9a 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -4,7 +4,8 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["master"] + branches: + - main # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 911b61aab..b4d5d7dfd 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -2,101 +2,103 @@ name: Go Tests on: push: - pull_request: + branches: + - main + # pull_request: jobs: - lint: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - - uses: actions/checkout@v3 + # lint: + # name: lint + # runs-on: ubuntu-latest + # steps: + # - uses: actions/setup-go@v3 + # with: + # go-version: 1.21 + + # - uses: actions/checkout@v3 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: latest - # Matches the "primary" golangci-lint command in the Makefile - args: | - --timeout 3m --disable-all --enable=govet --enable=gofmt --enable=goimports --enable=misspell \ - --skip-dirs "vendor" \ - --skip-dirs "webdash" \ - --skip-dirs "cmd/webdash" \ - --skip-dirs "funnel-work-dir" \ - -e '.*bundle.go' -e ".*pb.go" -e ".*pb.gw.go" \ - ./... + # - name: golangci-lint + # uses: golangci/golangci-lint-action@v3 + # with: + # version: latest + # # Matches the "primary" golangci-lint command in the Makefile + # args: | + # --timeout 3m --disable-all --enable=govet --enable=gofmt --enable=goimports --enable=misspell \ + # --skip-dirs "vendor" \ + # --skip-dirs "webdash" \ + # --skip-dirs "cmd/webdash" \ + # --skip-dirs "funnel-work-dir" \ + # -e '.*bundle.go' -e ".*pb.go" -e ".*pb.gw.go" \ + # ./... - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: latest - # Matches the "termdash" golangci-lint command in the Makefile - args: | - --timeout 3m --disable-all --enable=vet --enable=gofmt --enable=goimports --enable=misspell \ - ./cmd/termdash/... - - unitTest: - runs-on: ubuntu-latest - steps: - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: 1.21 - - name: Check out code - uses: actions/checkout@v2 - - - name: Unit Tests - run: make test-verbose + # - name: golangci-lint + # uses: golangci/golangci-lint-action@v3 + # with: + # version: latest + # # Matches the "termdash" golangci-lint command in the Makefile + # args: | + # --timeout 3m --disable-all --enable=vet --enable=gofmt --enable=goimports --enable=misspell \ + # ./cmd/termdash/... + + # unitTest: + # runs-on: ubuntu-latest + # steps: + # - name: Set up Go 1.x + # uses: actions/setup-go@v5 + # with: + # go-version: 1.21 + # - name: Check out code + # uses: actions/checkout@v2 + + # - name: Unit Tests + # run: make test-verbose build: uses: ./.github/workflows/build.yml - mongoTest: - runs-on: ubuntu-latest - needs: build - steps: - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: 1.21 - - - name: Check out code - uses: actions/checkout@v2 - - - name: Download funnel bin - uses: actions/download-artifact@v4 - with: - name: funnel - - - name: MongoTest - run: | - chmod +x funnel - make start-mongodb - sleep 10 - make test-mongodb - - badgerTest: - runs-on: ubuntu-latest - needs: build - steps: - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: 1.21 - - name: Check out code - uses: actions/checkout@v2 - - - name: Download funnel bin - uses: actions/download-artifact@v4 - with: - name: funnel - - name: Badger Test - run: | - chmod +x funnel - make test-badger + # mongoTest: + # runs-on: ubuntu-latest + # needs: build + # steps: + # - name: Set up Go 1.x + # uses: actions/setup-go@v5 + # with: + # go-version: 1.21 + + # - name: Check out code + # uses: actions/checkout@v2 + + # - name: Download funnel bin + # uses: actions/download-artifact@v4 + # with: + # name: funnel + + # - name: MongoTest + # run: | + # chmod +x funnel + # make start-mongodb + # sleep 10 + # make test-mongodb + + # badgerTest: + # runs-on: ubuntu-latest + # needs: build + # steps: + # - name: Set up Go 1.x + # uses: actions/setup-go@v5 + # with: + # go-version: 1.21 + # - name: Check out code + # uses: actions/checkout@v2 + + # - name: Download funnel bin + # uses: actions/download-artifact@v4 + # with: + # name: funnel + # - name: Badger Test + # run: | + # chmod +x funnel + # make test-badger slurmTest: runs-on: ubuntu-latest @@ -114,31 +116,34 @@ jobs: with: name: funnel + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + - name: Slurm Test run: | chmod +x funnel make test-slurm - s3Test: - runs-on: ubuntu-latest - needs: build - steps: - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: 1.21 - - name: Check out code - uses: actions/checkout@v2 - - - name: Download funnel bin - uses: actions/download-artifact@v4 - with: - name: funnel - - - name: S3 Test - run: | - chmod +x funnel - make start-generic-s3 - sleep 10 - make test-generic-s3 - + # s3Test: + # runs-on: ubuntu-latest + # needs: build + # steps: + # - name: Set up Go 1.x + # uses: actions/setup-go@v5 + # with: + # go-version: 1.21 + # - name: Check out code + # uses: actions/checkout@v2 + + # - name: Download funnel bin + # uses: actions/download-artifact@v4 + # with: + # name: funnel + + # - name: S3 Test + # run: | + # chmod +x funnel + # make start-generic-s3 + # sleep 10 + # make test-generic-s3 + \ No newline at end of file diff --git a/tests/slurm/slurm_test.go b/tests/slurm/slurm_test.go index c79914444..96d26efe3 100644 --- a/tests/slurm/slurm_test.go +++ b/tests/slurm/slurm_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - "github.com/ohsu-comp-bio/funnel/logger" "github.com/ohsu-comp-bio/funnel/tes" "github.com/ohsu-comp-bio/funnel/tests" ) @@ -16,14 +15,14 @@ import ( var fun *tests.Funnel var serverName string -func TestMain(m *testing.M) { +func TestMain(t *testing.T) { tests.ParseConfig() conf := tests.DefaultConfig() - if conf.Compute != "slurm" { - logger.Debug("Skipping slurm e2e tests...") - os.Exit(0) - } + // if conf.Compute != "slurm" { + // logger.Debug("Skipping slurm e2e tests...") + // os.Exit(0) + // } fun = tests.NewFunnel(conf) serverName = "funnel-test-server-" + tests.RandomString(6) @@ -35,7 +34,7 @@ func TestMain(m *testing.M) { os.Exit(exit) }() - exit = m.Run() + // exit = t.Run() return }