Fix CI Output #7
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Foreman | |
uses: Roblox/setup-foreman@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Toolchain | |
run: foreman install | |
- name: Run Tests | |
run: | | |
set +e # Don't exit on error | |
find libs -name "*test.luau" | while read -r file; do | |
echo "Running test: $file" | |
lune "$file" 2>&1 | tee -a test_output.log | |
echo "Exit code: $?" >> test_output.log | |
echo "----------------------------------------" >> test_output.log | |
done | |
set -e # Re-enable exit on error | |
echo "Full test output:" | |
cat test_output.log | |
- name: Upload Results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-results | |
path: test_output.log |