Add several github workflows

This commit is contained in:
ItsDrike 2024-06-30 23:11:55 +02:00
parent 8b78208f58
commit bd9af98819
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
6 changed files with 297 additions and 0 deletions

43
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,43 @@
---
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Cancel already running workflows if new ones are scheduled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validation:
uses: ./.github/workflows/validation.yml
unit-tests:
uses: ./.github/workflows/unit-tests.yml
# Produce a pull request payload artifact with various data about the
# pull-request event (such as the PR number, title, author, ...).
# This data is then be picked up by status-embed.yml action.
pr_artifact:
name: Produce Pull Request payload artifact
runs-on: ubuntu-latest
steps:
- name: Prepare Pull Request Payload artifact
id: prepare-artifact
if: always() && github.event_name == 'pull_request'
continue-on-error: true
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: pull-request-payload
path: pull_request_payload.json