diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml new file mode 100644 index 0000000000..7808d94693 --- /dev/null +++ b/.github/workflows/test-docker.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test-integration.yml similarity index 70% rename from .github/workflows/test.yml rename to .github/workflows/test-integration.yml index c961c66ddd..ed7876e015 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test-integration.yml @@ -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 diff --git a/.github/workflows/test-litmus.yml b/.github/workflows/test-litmus.yml new file mode 100644 index 0000000000..e0ca065eb5 --- /dev/null +++ b/.github/workflows/test-litmus.yml @@ -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 }} diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml new file mode 100644 index 0000000000..998de94e53 --- /dev/null +++ b/.github/workflows/test-unit.yml @@ -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 }}