From dc8f26a5ecd38ddbfec2eb5c9e9755bda7c4302c Mon Sep 17 00:00:00 2001 From: Eggflaw Date: Tue, 28 May 2024 21:12:49 +0900 Subject: [PATCH] workflow: add ci workflow --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ selene.toml | 1 + 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 selene.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..64ec38f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Aftman + uses: ok-nick/setup-aftman@v0.4.2 + - name: Run Tests + run: lune run test tests/ + + lint: + name: Linting + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Aftman + uses: ok-nick/setup-aftman@v0.4.2 + + - name: Lint + run: selene lib/ + + style: + name: Styling + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Aftman + uses: ok-nick/setup-aftman@v0.4.2 + + - name: Check code style + run: stylua --check lib/ diff --git a/selene.toml b/selene.toml new file mode 100644 index 0000000..a30015a --- /dev/null +++ b/selene.toml @@ -0,0 +1 @@ +std = "luau"