diff --git a/.github/workflows/cI.yml b/.github/workflows/cI.yml new file mode 100644 index 0000000..08b9204 --- /dev/null +++ b/.github/workflows/cI.yml @@ -0,0 +1,41 @@ +name: Bash Scripts CI + +# This workflow runs every time code is pushed to main +# and ever time a pull request targets main +on: + + push: + branches: [ main ] + pull_request: + branches: [ main ] + + jobs: + test-scripts: + # Github provides a fresh Ubuntu virtual machine for this job + runs-on: ubuntu-latest + + steps: + # Download the repository code onto the virtual machine + # Without this step, the runner has no files to work with + - name: Checkout repository + uses: actions/checkout@v4 + + # Step 2: Make all test scripts executable + # The runner is a fresh machine - it doesn't inherit permission from > + run: chmod +x scripts/*.sh + + # Step 3: Run disk-check.sh and check its exit code + # If the exit code is 0, the test passes + # If the exit code is not 0, the test fails + - name: Run disk-check + run: bash scripts/disk-check.sh + + # Step 4: Run key-hunter + - name: Run key-hunter + run: bash scripts/key-hunter.sh + + # Step 5: Run ram-check + - name: Run ram-check + run: bash scripts/ram-check.sh + +