bookrunner/.github/workflows/pre-commit.yml

35 lines
777 B
YAML
Raw Permalink Normal View History

2022-09-30 10:12:14 -07:00
name: pre-commit
on: [push, pull_request, workflow_dispatch]
jobs:
2022-11-27 10:27:09 -08:00
check:
2022-09-30 10:12:14 -07:00
runs-on: ubuntu-latest
steps:
2023-07-23 09:46:55 -07:00
- name: update
run: sudo apt-get update -y
2022-09-30 10:12:14 -07:00
- uses: actions/checkout@master
- uses: actions/setup-python@master
- name: install luarocks
run: sudo apt-get install -y luarocks
2022-11-27 10:27:09 -08:00
- name: add luarocks path
run: echo "$HOME/.luarocks/bin" >> $GITHUB_PATH
2022-09-30 10:12:14 -07:00
- name: luacheck install
run: luarocks install --local luacheck
2022-11-27 10:27:09 -08:00
- name: install cargo
run: sudo apt-get install -y cargo
- name: install stylua
run: cargo install stylua
2022-09-30 10:12:14 -07:00
- name: Install pre-commit
run: pip3 install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files