Switch to single workflow file
This commit is contained in:
parent
99bd6d15ad
commit
070a7c7c1b
@ -1,33 +0,0 @@
|
||||
name: Build
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Tests"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
execute-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set 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/${{ gitea.workflow }}","status":"running"}'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Build
|
||||
id: build
|
||||
run: ./gradlew build -x test
|
||||
- name: Publish 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/${{ gitea.workflow }}","status":"${{ steps.build.conclusion }}"}'
|
@ -1,18 +0,0 @@
|
||||
name: Init
|
||||
on: [push]
|
||||
jobs:
|
||||
execute-tests:
|
||||
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 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 test"}'
|
@ -1,33 +0,0 @@
|
||||
name: Tests
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Init"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
execute-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set 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/${{ gitea.workflow }}","status":"running"}'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Run tests
|
||||
id: tests
|
||||
run: ./gradlew test
|
||||
- name: Publish 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/${{ gitea.workflow }}","status":"${{ steps.tests.conclusion }}"}'
|
72
.gitea/workflows/workflow.yaml
Normal file
72
.gitea/workflows/workflow.yaml
Normal file
@ -0,0 +1,72 @@
|
||||
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 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 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: '17'
|
||||
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 }}"}'
|
||||
build:
|
||||
needs: 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: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Build
|
||||
id: build
|
||||
run: ./gradlew build -x test
|
||||
- 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 }}"}'
|
@ -1,5 +1,5 @@
|
||||
[![Tests](https://barrelsofdata.com/api/v1/git/action/status/fetch/barrelsofdata/spark-boilerplate/Tests)](https://git.barrelsofdata.com/barrelsofdata/spark-boilerplate/actions?workflow=tests.yaml)
|
||||
[![Build](https://barrelsofdata.com/api/v1/git/action/status/fetch/barrelsofdata/spark-boilerplate/Build)](https://git.barrelsofdata.com/barrelsofdata/spark-boilerplate/actions?workflow=build.yaml)
|
||||
[![Tests](https://barrelsofdata.com/api/v1/git/action/status/fetch/barrelsofdata/spark-boilerplate/tests)](https://git.barrelsofdata.com/barrelsofdata/spark-boilerplate/actions?workflow=workflow.yaml)
|
||||
[![Build](https://barrelsofdata.com/api/v1/git/action/status/fetch/barrelsofdata/spark-boilerplate/build)](https://git.barrelsofdata.com/barrelsofdata/spark-boilerplate/actions?workflow=workflow.yaml)
|
||||
|
||||
# Spark Boilerplate
|
||||
This is a boilerplate project for Apache Spark. The related blog post can be found at [https://www.barrelsofdata.com/spark-boilerplate-using-scala](https://www.barrelsofdata.com/spark-boilerplate-using-scala)
|
||||
|
Loading…
Reference in New Issue
Block a user