Skip to content

Commit

Permalink
debug: Slurm Github Action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Oct 1, 2024
1 parent 1fa7ebe commit db7a5ac
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 119 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/compliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ name: Compliance Test

on:
push:
pull_request:
branches:
- main
# pull_request:

jobs:
build:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
225 changes: 115 additions & 110 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

13 changes: 6 additions & 7 deletions tests/slurm/slurm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@ import (
"testing"
"time"

"github.com/ohsu-comp-bio/funnel/logger"
"github.com/ohsu-comp-bio/funnel/tes"
"github.com/ohsu-comp-bio/funnel/tests"
)

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)
Expand All @@ -35,7 +34,7 @@ func TestMain(m *testing.M) {
os.Exit(exit)
}()

exit = m.Run()
// exit = t.Run()
return
}

Expand Down

0 comments on commit db7a5ac

Please sign in to comment.