name: Tests on: [push] jobs: reset-status: runs-on: ubuntu-latest steps: - name: Reset test status run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/tests","status":"starting"}' - name: Reset integration test status run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/integration-tests","status":"waiting for test"}' - name: Reset build status run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/build","status":"waiting for integration test"}' tests: needs: reset-status runs-on: ubuntu-latest steps: - name: Set test running run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/tests","status":"running"}' - name: Checkout uses: actions/checkout@v4 - name: Set up java uses: actions/setup-java@v3 with: java-version: '21' distribution: 'temurin' - name: Run tests id: tests run: ./gradlew test - name: Publish test status if: always() run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/tests","status":"${{ steps.tests.conclusion }}"}' integration-tests: needs: tests runs-on: ubuntu-latest steps: - name: Set integration test running run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/integration-tests","status":"running"}' - name: Checkout uses: actions/checkout@v4 - name: Set up java uses: actions/setup-java@v3 with: java-version: '21' distribution: 'temurin' - name: Run integration tests id: integration-tests run: ./gradlew integrationTest - name: Publish integration test status if: always() run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/integration-tests","status":"${{ steps.integration-tests.conclusion }}"}' build: needs: integration-tests runs-on: ubuntu-latest steps: - name: Set build running run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/build","status":"running"}' - name: Checkout uses: actions/checkout@v4 - name: Set up java uses: actions/setup-java@v3 with: java-version: '21' distribution: 'temurin' - name: Build id: build run: ./gradlew build -x check - name: Publish build status if: always() run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ -H 'Content-Type: application/json' \ -d '{"action":"${{ gitea.repository }}/action/build","status":"${{ steps.build.conclusion }}"}'