Bumps [JohnnyMorganz/stylua-action](https://github.com/JohnnyMorganz/stylua-action) from 1.1.2 to 2.0.0. - [Release notes](https://github.com/JohnnyMorganz/stylua-action/releases) - [Commits](https://github.com/JohnnyMorganz/stylua-action/compare/v1.1.2...v2.0.0) --- updated-dependencies: - dependency-name: JohnnyMorganz/stylua-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
96 lines
2.2 KiB
YAML
96 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push: { branches: ["0.x"] }
|
|
pull_request: { branches: ["0.x"] }
|
|
|
|
jobs:
|
|
commits:
|
|
name: Commitlint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1000
|
|
|
|
- name: Lint commits
|
|
uses: docker://registry.k1.zportal.co.uk/practically-oss/conventional-tools:0.x
|
|
with:
|
|
args: conventional-tools commitlint -l1 -f39febd82e236a9c79f5b408e98cbd20410f11e9e
|
|
|
|
luacheck:
|
|
name: Luacheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install luarocks
|
|
run: sudo apt update && sudo apt install -y luarocks
|
|
|
|
- name: Install luacheck
|
|
run: sudo luarocks install luacheck
|
|
|
|
- name: Run luacheck
|
|
run: luacheck .
|
|
|
|
stylua:
|
|
name: StyLua
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run stylua
|
|
uses: JohnnyMorganz/stylua-action@v2.0.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --check .
|
|
|
|
clang-format:
|
|
name: Clang Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Dependencies
|
|
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y clang-format findutils
|
|
|
|
- name: Run clang format
|
|
run: find ./cpp -name "*.cpp" -o -name "*.hpp" | xargs clang-format -Werror --dry-run
|
|
|
|
cargo-format:
|
|
name: Cargo Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run cargo format
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
test:
|
|
name: Build and test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt update && sudo apt install -y luajit build-essential
|
|
|
|
- name: Build
|
|
run: cargo build --release
|
|
|
|
- name: Test
|
|
run: find lua -name "*_test.lua" | xargs luajit scripts/test.lua
|