Skip to content

Commit

Permalink
chore: improve actions
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Dec 13, 2023
1 parent 0d62dad commit d4dfdce
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 211 deletions.
24 changes: 24 additions & 0 deletions .github/actions/dcp_test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
inputs:
version:
description: 'Couchbase Version'
default: ''
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: ${{ inputs.version }}
217 changes: 6 additions & 211 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,223 +37,18 @@ jobs:

- name: Test
run: go test -parallel 1 -v ./...
dcp_test_v501:
dcp_test:
runs-on: ubuntu-latest
needs:
- build
strategy:
matrix:
version: ["5.0.1", "5.1.0", "5.5.0", "6.0.0", "6.5.0", "6.6.0", "7.0.0", "7.1.0", "7.2.0", "7.2.3"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
- uses: ./.github/actions/dcp_test
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 5.0.1
dcp_test_v510:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 5.1.0
dcp_test_v550:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 5.5.0
dcp_test_v600:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 6.0.0
dcp_test_v650:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 6.5.0
dcp_test_v660:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 6.6.0
dcp_test_v700:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 7.0.0
dcp_test_v710:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 7.1.0
dcp_test_v720:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 7.2.0
dcp_test_v723:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Install dependencies
run: go get .

- name: Test DCP
run: go test -run "^\QTestDcp\E$"
env:
CB_VERSION: 7.2.3
version: ${{ matrix.version }}

0 comments on commit d4dfdce

Please sign in to comment.