Skip to content

Commit

Permalink
GitHub Actions: minor optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtamm committed Mar 2, 2024
1 parent 39a7e52 commit a3e59d8
Showing 1 changed file with 23 additions and 30 deletions.
53 changes: 23 additions & 30 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,28 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
args: --skip-dirs tests --modules-download-mode mod --timeout 10m --verbose
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
skip-pkg-cache: true
args: --skip-dirs tests --timeout 10m --verbose

build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21

- name: Check out code
uses: actions/checkout@v4

go-version-file: go.mod
- name: Build
run: go build -v ./

- name: Store funnel
uses: actions/upload-artifact@v4
with:
Expand All @@ -41,12 +39,12 @@ jobs:
unitTest:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
- name: Check out code
uses: actions/checkout@v4
go-version-file: go.mod
- name: Unit Tests
run: make test

Expand All @@ -56,14 +54,12 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Download funnel bin
uses: actions/download-artifact@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
name: funnelBin
go-version-file: go.mod
- name: MongoTest
run: |
chmod +x funnel
make start-mongodb
sleep 10
make test-mongodb
Expand All @@ -74,12 +70,9 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Download funnel bin
uses: actions/download-artifact@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
name: funnelBin
go-version-file: go.mod
- name: Badger Test
run: |
chmod +x funnel
make test-badger
run: make test-badger

0 comments on commit a3e59d8

Please sign in to comment.