Bump to dotnet 10 #4
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
# Idea is that for the given input like `test_data.csv` the output should always be the same | |
# Within this process we make sure that `generate_alert.py` have right logic and correct output | |
name: Unit test | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: pip3 install -r requirements.txt | |
# If there is difference between files, job will fail | |
- name: Compare results | |
id: verify | |
run: | | |
python3 generate_alert.py $TEST_DATA $REGRESSION_PATH | |
diff $TEST_REGRESSION_PATH $REGRESSION_PATH | |
env: | |
TEST_DATA: "scripts/unit-tests/test_data.csv" | |
TEST_REGRESSION_PATH: "scripts/unit-tests/test_regressions.txt" | |
REGRESSION_PATH: "scripts/unit-tests/regressions.txt" |