2025-03-03 14:13:51 -08:00

40 lines
1.2 KiB
YAML

name: PR Checks
on:
pull_request:
branches:
- main
jobs:
pr-checks:
runs-on: ubuntu-latest
steps:
- name: Install Node
run: |
apt-get update && apt-get install -y nodejs
- name: Checkout
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
# Usually I would...
# - name: Super Linter
# uses: super-linter/super-linter@v7.3.0
# But it's not playing nice with Gitea Actions:
# https://gitea.scubbo.org/scubbo/commit-report-sync/actions/runs/11/jobs/0
# `failed to create container: 'Error response from daemon: conflicting options: custom host-to-IP mapping and the network mode'`
# So, while getting this working, falling back to ESLint and Prettier.
#
# Also TODO - convert these to actually fix problems, not just report them (mostly pretty easy - `--write` for prettier,
# and I gotta assume there's similar for `eslint` - but, I want to only change one thing at a time!)
- name: ESLint
run: |
npm install eslint
npx eslint .
- name: Prettier
run: |
npm install prettier
npx prettier .