mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: Repo root CI
|
|
|
|
# All workflows are triggered based on specific paths,
|
|
# the root repository is something that is not applicable to rust nor typescript
|
|
# so it has been moved in a standalone workflow
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
format:
|
|
name: Check format
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install NodeJS Dependencies
|
|
uses: ./.github/actions/install-node-dependencies
|
|
|
|
- name: Test project
|
|
run: pnpm repo:root:format:check
|
|
|
|
ci_ok:
|
|
name: Repo root CI OK
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 1
|
|
if: always()
|
|
needs: [format]
|
|
env:
|
|
FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }}
|
|
CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }}
|
|
steps:
|
|
- name: Check for failure or cancelled jobs result
|
|
shell: bash
|
|
run: |
|
|
echo "Failure: $FAILURE - Cancelled: $CANCELLED"
|
|
if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then
|
|
exit 0
|
|
else
|
|
exit 1
|
|
fi
|