From 88d6fdcc93e9e520d7f65fb38bcb0c2e332cc07d Mon Sep 17 00:00:00 2001 From: Yichao 'Peak' Ji Date: Thu, 18 Apr 2024 23:51:43 +0800 Subject: [PATCH] build(ci): use default working directory --- .github/workflows/codecov.yml | 10 ++-------- .github/workflows/go.yml | 9 ++------- .github/workflows/memdb.yml | 9 ++------- .github/workflows/mongodb.yml | 9 ++------- .github/workflows/release.yml | 9 ++------- 5 files changed, 10 insertions(+), 36 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 5216b68..0a9202f 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -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/mongodb-github-action@v1.10.0 with: @@ -36,4 +31,3 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true - working-directory: main diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 75b2213..e5fa5e5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 diff --git a/.github/workflows/memdb.yml b/.github/workflows/memdb.yml index 811fa1a..e68321d 100644 --- a/.github/workflows/memdb.yml +++ b/.github/workflows/memdb.yml @@ -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 diff --git a/.github/workflows/mongodb.yml b/.github/workflows/mongodb.yml index 56dde92..db8edff 100644 --- a/.github/workflows/mongodb.yml +++ b/.github/workflows/mongodb.yml @@ -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/mongodb-github-action@v1.10.0 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cee445f..710be85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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