ci(): simplification #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Workflow | |
on: | |
pull_request: | |
branches: | |
- develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
JAVA_VERSION: "21" | |
DOCKER_APT_PACKAGES: python3 python3-venv python-is-python3 python3-pip nodejs npm curl zip unzip | |
DOCKER_PYTHON_LIBRARIES: kestra | |
PLUGIN_VERSION: ${{ github.event.inputs.plugin-version != null && github.event.inputs.plugin-version || 'LATEST' }} | |
# to save corepack from itself | |
COREPACK_INTEGRITY_KEYS: 0 | |
jobs: | |
file-changes: | |
name: File changes detection | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
outputs: | |
ui: ${{ steps.changes.outputs.ui }} | |
translations: ${{ steps.changes.outputs.translations }} | |
backend: ${{ steps.changes.outputs.backend }} | |
steps: | |
- uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
ui: | |
- 'ui/**' | |
translations: | |
- 'ui/src/translations/**' | |
backend: | |
- '!{ui,.github}/**' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
frontend: | |
name: 'Check Frontend' | |
needs: file-changes | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
if: "needs.file-changes.outputs.ui == 'true'" | |
steps: | |
- uses: actions/checkout@v4 | |
- id: generate-translations | |
name: Generate translations | |
if: "needs.file-changes.outputs.translations == 'true'" | |
uses: ./.github/actions/action-generate-translations | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
- id: frontend-test | |
name: Frontend test | |
uses: ./.github/actions/action-frontend-test | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
backend: | |
name: 'Check Backend' | |
needs: file-changes | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
if: needs.file-changes.outputs.backend == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Backend test | |
uses: ./.github/actions/action-backend-test | |
with: | |
codecov-token: ${{ secrets.CODECOV_TOKEN }} | |
sonar-token: ${{ secrets.SONAR_TOKEN }} | |
github-token: ${{ secrets.GH_PERSONAL_TOKEN }} | |
google-service-account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | |
build-artifacts: | |
if: "needs.file-changes.outputs.backend == 'true' || needs.file-changes.outputs.ui == 'true'" | |
name: Build artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/action-build-artifacts | |
id: build-artifacts | |
e2e: | |
name: Check E2E | |
needs: [build-artifacts] | |
uses: ./.github/workflows/e2e.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
backends: [ "postgres" ] | |
with: | |
tags: oss | |
backend: ${{ matrix.backends }} | |
docker-artifact-name: ${{ needs.build-artifacts.outputs.docker-artifact-name }} | |
docker-image-tag: kestra/kestra:${{ needs.build-artifacts.outputs.docker-tag }} | |
secrets: | |
GITHUB_AUTH_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }} | |
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | |
end: | |
name: End | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
# Slack | |
- name: Slack notification | |
uses: Gamesight/slack-workflow-status@master | |
if: ${{ always() && env.SLACK_WEBHOOK_URL != 0 }} | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
name: GitHub Actions | |
icon_emoji: ":github-actions:" | |
channel: "C02DQ1A7JLR" |