Merge branch 'main' into 227-automate-release #764
Workflow file for this run
This file contains hidden or 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: System tests | |
| on: [push] | |
| jobs: | |
| monitor-system-tests-unix: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code, branch='${{ github.ref }}' | |
| uses: actions/checkout@v2 | |
| - name: Install pytest | |
| run: pip3 install pytest | |
| - name: Build FIM | |
| run: cargo build --release | |
| - name: Change configuration to test on Linux | |
| if: runner.os == 'Linux' | |
| run: sed -i 's|usr/bin/.*|tmp/test|g' config/linux/config.yml | |
| - name: Change configuration to test on macOS | |
| if: runner.os == 'macOS' | |
| run: sed -i '' 's|usr/bin.*|tmp/test|g' config/linux/config.yml | |
| - name: Copy FIM binary to main folder | |
| run: cp ./target/release/fim ./ | |
| - name: Create required directories | |
| run: mkdir -p /tmp/test | |
| - name: Create events file and folder | |
| run: sudo mkdir -p /var/lib/fim/ && sudo touch /var/lib/fim/events.json && sudo chown -R runner:runner /var/lib/fim | |
| - name: Create log file and folder | |
| run: sudo mkdir -p /var/log/fim/ && sudo touch /var/log/fim/fim.log && sudo chown -R runner:runner /var/log/fim | |
| - name: Start FIM process | |
| run: sudo ./fim & | |
| - name: Launch test suite | |
| run: python3 -m pytest test/system/monitor.py -v --noconftest | |
| - name: Print events.json file | |
| if: always() | |
| run: cat /var/lib/fim/events.json | |
| - run: echo "Job's status is ${{ job.status }}." |