hammer/.github/workflows/ci.yml
Mark Marks 33913122fd fix: Pass gh token to download-jecs in CI
+ The action github token wasn't passed to the download jecs step in CI
2024-09-24 15:36:48 +02:00

85 lines
1.8 KiB
YAML

name: Continous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rokit
uses: CompeyDev/setup-rokit@v0.1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Analyze
run: lune run analyze
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rokit
uses: CompeyDev/setup-rokit@v0.1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: |
selene lib/
style:
name: Styling
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check code style
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.20.0
args: --check lib/
test:
name: Unit Testing
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Luau
uses: encodedvenom/install-luau@v2.1
- name: Install Rokit
uses: CompeyDev/setup-rokit@v0.1.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download Jecs
run: |
lune run download-jecs ${{ secrets.GITHUB_TOKEN }}
- name: Run Unit Tests
run: |
output=$(luau test/tests.luau)
echo "$output"
if [[ "$output" == *"0 fails"* ]]; then
echo "Unit Tests Passed"
else
echo "Error: One or More Unit Tests Failed."
exit 1
fi