Files
is-a-dev/.github/workflows/checks.yml
T
William Harrison ab47511d86 Update checks.yml
2024-04-24 12:46:50 +08:00

21 lines
989 B
YAML

name: Checks
on: [pull_request, workflow_dispatch]
jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- name: Run tests
run: bun test || (echo 'Tests failed, closing pull request.' && gh pr close https://github.com/${{ github.repository }}/pull/${{ github.event.number }} --comment "Due to high amounts of pull requests and not enough resources to review all, we are automatically closing pull requests that fail checks. Please read the documention (https://www.is-a.dev/docs) to ensure your file format is correct. If you still are encountering issues, please join our [Discord server](https://discord.gg/is-a-dev-830872854677422150) and open a help thread." && exit 1)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}