Merge pull request #3 from atodorov284/main #1
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: Output check | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check-reproducibility: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run setup script | |
run: pip3 install -r requirements.txt | |
- name: Check output | |
run: | | |
output=$(python main.py) | |
expected_output=$(python -c "import numpy as np; print(np.array(np.arange(1, 11)))") | |
if [ "$output" != "$expected_output" ]; then | |
echo "Output is $output, but expected $expected_output" | |
exit 1 | |
fi |