wg-lua/.github/workflows/ci.yaml

96 lines
2.3 KiB
YAML
Raw Normal View History

2024-03-27 17:27:43 +00:00
name: CI
on:
push:
pull_request:
workflow_dispatch:
2024-03-27 17:27:43 +00:00
defaults:
run:
shell: bash
2024-03-27 17:27:43 +00:00
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
2024-03-27 17:27:43 +00:00
- name: Install PNPM
uses: pnpm/action-setup@v3
2024-03-27 17:27:43 +00:00
- name: Install Node
uses: actions/setup-node@v4.0.2
with:
cache: "pnpm"
2024-03-27 17:27:43 +00:00
- name: Install dependencies
run: pnpm i
2024-03-27 17:27:43 +00:00
- name: Install tooling
uses: ok-nick/setup-aftman@v0.4.2
2024-03-27 17:27:43 +00:00
- name: Check formatting
run: pnpm check_fmt
2024-03-27 17:27:43 +00:00
ci:
needs: ["fmt"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
2024-03-27 17:27:43 +00:00
- name: Install PNPM
uses: pnpm/action-setup@v3
2024-03-27 17:27:43 +00:00
- name: Install Node
uses: actions/setup-node@v4.0.2
with:
cache: "pnpm"
2024-03-27 17:27:43 +00:00
- name: Install dependencies
run: pnpm i
2024-03-27 17:27:43 +00:00
- name: Install tooling
uses: ok-nick/setup-aftman@v0.4.2
2024-03-27 17:27:43 +00:00
- name: Build
run: pnpm build
2024-03-27 17:27:43 +00:00
- name: Test
run: pnpm test
2024-03-28 10:52:06 +00:00
lint:
needs: ["ci"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
2024-03-28 10:52:06 +00:00
- name: Install PNPM
uses: pnpm/action-setup@v3
- name: Install Node
uses: actions/setup-node@v4.0.2
with:
cache: "pnpm"
- name: Install dependencies
run: pnpm i
- name: Install tooling
uses: ok-nick/setup-aftman@v0.4.2
2024-03-28 10:52:06 +00:00
- name: Build
run: lune setup && pnpm build
2024-03-28 10:52:06 +00:00
- name: Analyze
run: luau-lsp analyze --ignore=".lune/terracotta/**" --settings=".vscode/settings.json" tests/ examples/ .lune/
2024-03-28 10:52:06 +00:00
- name: Lint
run: pnpm lint