Skip to content

Commit

Permalink
fix: enable cache for Set up Go action (#3933)
Browse files Browse the repository at this point in the history
* enable cache for Set up Go action

* different order

* try again

* try again

* try again

* try again

* try again

* fix order

* run matrix

* fix yaml

* matrix for integration tests

* fix targets

* beautify

* remove dup
  • Loading branch information
javiermolinar authored Aug 2, 2024
1 parent 214c21e commit 2ea9d04
Showing 1 changed file with 47 additions and 122 deletions.
169 changes: 47 additions & 122 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ concurrency:
cancel-in-progress: true

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: '0'

fetch-depth: "0"
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: check-fmt
run: make check-fmt

Expand All @@ -41,137 +38,65 @@ jobs:
- name: lint
run: make lint base=origin/${{github.base_ref}}

unit-tests-pkg:
name: Test packages - pkg
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

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

- name: Test
run: make test-with-cover-pkg

unit-tests-tempodb:
name: Test packages - tempodb
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'
strategy:
matrix:
test-target:
[
test-with-cover-pkg,
test-with-cover-tempodb,
test-with-cover-tempodb-wal,
test-with-cover-others,
]

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

- name: Test
run: make test-with-cover-tempodb

unit-tests-tempodb-wal:
name: Test packages - tempodb/wal
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

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

- name: Test
run: make test-with-cover-tempodb-wal

unit-tests-others:
name: Test packages - others
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'
go-version-file: "go.mod"

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

- name: Test
run: make test-with-cover-others
- name: Run Tests
run: make ${{ matrix.test-target }}

integration-tests:
name: Test integration e2e suite
name: Run integration tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

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

- name: Test
run: make test-e2e
strategy:
matrix:
test-target:
[
test-e2e,
test-integration-poller,
test-e2e-deployments,
test-e2e-serverless,
]

integration-tests-poller:
name: Test integration e2e suite - poller
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

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

- name: Poller
run: make test-integration-poller

integration-tests-deployment-modes:
name: Test integration e2e suite - deployment modes
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

- name: Check out code
uses: actions/checkout@v4
go-version-file: "go.mod"
- name: Run Tests
run: make ${{ matrix.test-target }}

- name: Deployment modes
run: make test-e2e-deployments

integration-tests-serverless:
name: Test integration e2e suite - serverless
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

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

- name: Test
run: make test-e2e-serverless

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

- name: Check out code
uses: actions/checkout@v4
go-version-file: "go.mod"

- name: Build Tempo
run: make tempo
Expand All @@ -189,13 +114,13 @@ jobs:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

- name: Check out code
uses: actions/checkout@v4
go-version-file: "go.mod"

- name: Bench
run: make test-bench
Expand All @@ -204,13 +129,13 @@ jobs:
name: Vendor check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

- name: Check out code
uses: actions/checkout@v4
go-version-file: "go.mod"

- name: Install Protoc
uses: arduino/setup-protoc@v3
Expand All @@ -224,13 +149,13 @@ jobs:
name: Check jsonnet & tempo-mixin
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '>=1.22.4'

- name: Check out code
uses: actions/checkout@v4
go-version-file: "go.mod"

- name: Check jsonnet
run: make jsonnet-check
Expand Down

0 comments on commit 2ea9d04

Please sign in to comment.