Test #12
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: Test | |
on: | |
workflow_run: | |
workflows: ["Build"] | |
types: | |
- completed | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Qt and dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-dev qt6-base-dev qt6-tools-dev qt6-tools-dev-tools cmake g++ | |
- name: Build project | |
run: | | |
mkdir -p build | |
cd build | |
cmake ../COS3711-03-01/ | |
make | |
- name: Run unit tests | |
run: | | |
cd build/tests # Adjust this path if your tests are in a different location | |
for test_executable in $(find . -type f -executable); do | |
echo "Running $test_executable" | |
$test_executable | |
done | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: build/tests/ |