mirror of
https://github.com/CompeyDev/lune-luau-template.git
synced 2024-12-12 12:50:41 +00:00
Add GitHub Actions setup for continuous integration
This commit is contained in:
parent
1397b6c289
commit
3e194e2a98
3 changed files with 55 additions and 2 deletions
48
.github/ci.yml
vendored
Normal file
48
.github/ci.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install tooling
|
||||||
|
uses: ok-nick/setup-aftman@v0.4.2
|
||||||
|
with:
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: lune run fmt src/ --check
|
||||||
|
|
||||||
|
lint:
|
||||||
|
needs: ["fmt"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install tooling
|
||||||
|
uses: ok-nick/setup-aftman@v0.4.2
|
||||||
|
with:
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Initialize typedefs
|
||||||
|
run: lune setup
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: lune run typecheck
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: lune run lint
|
|
@ -3,4 +3,9 @@
|
||||||
local command = require("util/command")
|
local command = require("util/command")
|
||||||
local process = require("@lune/process")
|
local process = require("@lune/process")
|
||||||
|
|
||||||
command.run("stylua", "--verbose", process.args[1] or "src/")
|
command.run(
|
||||||
|
"stylua",
|
||||||
|
"--verbose",
|
||||||
|
process.args[2] or "",
|
||||||
|
process.args[1] or "src/"
|
||||||
|
)
|
||||||
|
|
|
@ -16,4 +16,4 @@ This is a template for initializing [Luau](https://luau-lang.org) projects with
|
||||||
- Linting
|
- Linting
|
||||||
- Typechecking
|
- Typechecking
|
||||||
- Unit-testing setup (tests/) -- TODO
|
- Unit-testing setup (tests/) -- TODO
|
||||||
- GitHub Actions CI configuration to lints and tests (.github) -- TODO
|
- GitHub Actions CI configuration to lints and tests (.github)
|
||||||
|
|
Loading…
Reference in a new issue