Merge pull request #25 from BusyCityGuy/fix/release-commit #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI checks | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
install-tools: | |
name: Install tools and dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Install Rokit | |
uses: CompeyDev/[email protected] | |
- name: Setup Lune | |
run: lune setup | |
- name: Install dependencies with Wally | |
run: wally install | |
- name: Cache installed items | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.rokit | |
~/.lune | |
Packages | |
DevPackages | |
key: tools-${{ hashFiles('rokit.toml') }} | |
# Kampfkarren/selene is assumed to be included in the repository's rokit.toml file | |
linting: | |
name: Lint with Selene | |
runs-on: ubuntu-latest | |
needs: [install-tools] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore installed items | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.rokit | |
~/.lune | |
Packages | |
DevPackages | |
key: tools-${{ hashFiles('rokit.toml') }} | |
- name: Lint StateQ | |
run: ./scripts/lint.sh src/StateQ | |
- name: Lint tests | |
run: ./scripts/lint.sh src/TestService | |
- name: Lint Lune | |
run: ./scripts/lint.sh lune | |
# JohnnyMorganz/stylua is assumed to be included in the repository's rokit.toml file | |
formatting: | |
name: Check format with StyLua | |
runs-on: ubuntu-latest | |
needs: [install-tools] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore installed items | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.rokit | |
~/.lune | |
Packages | |
DevPackages | |
key: tools-${{ hashFiles('rokit.toml') }} | |
- name: Enforce StateQ code style with StyLua | |
run: ./scripts/formatCheck.sh src/StateQ | |
- name: Enforce tests code style with StyLua | |
run: ./scripts/formatCheck.sh src/TestService | |
- name: Enforce Lune scripts code style with StyLua | |
run: ./scripts/formatCheck.sh lune | |
# JohnnyMorganz/luau-lsp is assumed to be included in the repository's rokit.toml file | |
analyzing: | |
name: Analyze with luau-lsp | |
runs-on: ubuntu-latest | |
needs: [install-tools] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore installed items | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.rokit | |
~/.lune | |
Packages | |
DevPackages | |
key: tools-${{ hashFiles('rokit.toml') }} | |
- name: Analyze StateQ with luau-lsp | |
run: | | |
./scripts/sourcemap.sh default.project.json stateQSourcemap.json | |
./scripts/analyze.sh stateQSourcemap.json src/StateQ | |
- name: Analyze tests with luau-lsp | |
run: | | |
./scripts/sourcemap.sh test.project.json testSourcemap.json | |
./scripts/analyze.sh testSourcemap.json src/TestService | |
- name: Analyze Lune scripts with luau-lsp | |
run: ./scripts/analyze.sh lune | |
# lune-org/lune is assumed to be included in the repository's rokit.toml file | |
testing: | |
name: Run jest tests with Lune | |
runs-on: ubuntu-latest | |
needs: [install-tools] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore installed items | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.rokit | |
~/.lune | |
Packages | |
DevPackages | |
key: tools-${{ hashFiles('rokit.toml') }} | |
- name: Test with Lune | |
run: ./scripts/test.sh |