Skip to content

Commit

Permalink
build(ci): use default working directory (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
peakji authored Apr 18, 2024
1 parent b3f2f57 commit d31c3f9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 36 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,16 @@ jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
defaults:
run:
working-directory: main
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "main/go.mod"
go-version-file: "go.mod"
check-latest: true
cache: true
cache-dependency-path: "main/go.sum"
cache-dependency-path: "go.sum"
- name: Set up MongoDB
uses: supercharge/[email protected]
with:
Expand All @@ -36,4 +31,3 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
working-directory: main
9 changes: 2 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,16 @@ jobs:
test:
name: test
runs-on: ubuntu-latest
defaults:
run:
working-directory: main
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "main/go.mod"
go-version-file: "go.mod"
check-latest: true
cache: true
cache-dependency-path: "main/go.sum"
cache-dependency-path: "go.sum"
- name: Test packages
run: make test-short
- name: Build artifacts
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/memdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@ jobs:
test:
name: go-memdb
runs-on: ubuntu-latest
defaults:
run:
working-directory: main
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "main/go.mod"
go-version-file: "go.mod"
check-latest: true
cache: true
cache-dependency-path: "main/go.sum"
cache-dependency-path: "go.sum"
- name: Test packages
run: make test-engine-memdb
9 changes: 2 additions & 7 deletions .github/workflows/mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,16 @@ jobs:
strategy:
matrix:
mongodb-version: ["4.4", "5.0", "6.0", "7.0"]
defaults:
run:
working-directory: main
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "main/go.mod"
go-version-file: "go.mod"
check-latest: true
cache: true
cache-dependency-path: "main/go.sum"
cache-dependency-path: "go.sum"
- name: Set up MongoDB
uses: supercharge/[email protected]
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ jobs:
release:
name: release
runs-on: ubuntu-latest
defaults:
run:
working-directory: main
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "main/go.mod"
go-version-file: "go.mod"
check-latest: true
cache: true
cache-dependency-path: "main/go.sum"
cache-dependency-path: "go.sum"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
Expand Down

0 comments on commit d31c3f9

Please sign in to comment.