Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve workflows and use dedicated install luau script for CI #81

Merged
merged 7 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,19 @@ jobs:

steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Fetch Luau Latest Release
run: curl -s https://api.github.com/repos/luau-lang/luau/releases/latest | grep /luau-ubuntu.zip | cut -d '"' -f 4 > luau-link.txt

- name: Download Luau Latest Release
run: wget -i luau-link.txt

- name: Unzip binary
run: unzip luau-ubuntu.zip
- name: Install Luau
uses: encodedvenom/install-luau@v1

- name: Run Unit Tests
id: run_tests
run: |
output=$(./luau test/tests.luau)
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

- name: Cleanup Luau Binaries
if: '!cancelled()'
run: rm luau && rm luau-analyze && rm luau-compile && rm luau-ubuntu.zip && rm luau-link.txt
fi
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Aftman
uses: ok-nick/[email protected]
Expand All @@ -35,7 +35,7 @@ jobs:
contents: write
steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download Jecs Build
uses: actions/download-artifact@v3
Expand All @@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Aftman
uses: ok-nick/[email protected]
Expand Down