Skip to content

Commit

Permalink
split go tests
Browse files Browse the repository at this point in the history
  • Loading branch information
labkode committed Sep 9, 2024
1 parent 2cf16ef commit 27f362f
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 21 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test
on:
pull_request:
push:
branches:
- "*"
workflow_dispatch:

jobs:
docker:
strategy:
fail-fast: false
matrix:
file: [docker/Dockerfile.reva, docker/Dockerfile.revad-eos, docker/Dockerfile.revad-ceph]
uses: ./.github/workflows/docker.yml
with:
file: ${{ matrix.file }}
docker-revad:
name: docker (docker/Dockerfile.revad)
uses: ./.github/workflows/docker.yml
with:
file: docker/Dockerfile.revad
load: true
docker-revad-eos:
name: docker (docker/Dockerfile.revad-eos)
uses: ./.github/workflows/docker.yml
with:
file: docker/Dockerfile.revad-eos
load: false
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,6 @@ jobs:
env:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: reva
go:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: false
- name: Test
run: make test-go
env:
COVER_PROFILE: ${{ github.event_name == 'push' && 'coverage.out' || '' }}
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
if: github.event_name == 'push'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.out
force-coverage-parser: go
docker:
strategy:
fail-fast: false
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test-litmus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test
on:
pull_request:
push:
branches:
- "*"
workflow_dispatch:

jobs:
litmus:
needs:
- docker-revad-eos
strategy:
fail-fast: false
matrix:
test: [litmus-1, litmus-2]
uses: ./.github/workflows/compose.yml
with:
test: ${{ matrix.test }}
60 changes: 60 additions & 0 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test
on:
pull_request:
push:
branches:
- "*"
workflow_dispatch:

jobs:
unit-tests:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: false
- name: Test
run: make test-go
env:
COVER_PROFILE: ${{ github.event_name == 'push' && 'coverage.out' || '' }}
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
if: github.event_name == 'push'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.out
force-coverage-parser: go
docker:
strategy:
fail-fast: false
matrix:
file: [docker/Dockerfile.reva, docker/Dockerfile.revad-eos, docker/Dockerfile.revad-ceph]
uses: ./.github/workflows/docker.yml
with:
file: ${{ matrix.file }}
docker-revad:
name: docker (docker/Dockerfile.revad)
uses: ./.github/workflows/docker.yml
with:
file: docker/Dockerfile.revad
load: true
docker-revad-eos:
name: docker (docker/Dockerfile.revad-eos)
uses: ./.github/workflows/docker.yml
with:
file: docker/Dockerfile.revad-eos
load: false
litmus:
needs:
- docker-revad-eos
strategy:
fail-fast: false
matrix:
test: [litmus-1, litmus-2]
uses: ./.github/workflows/compose.yml
with:
test: ${{ matrix.test }}

0 comments on commit 27f362f

Please sign in to comment.