Update README.md #5
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: pytest | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
pytest: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Clone Submodule | |
uses: actions/checkout@v2 | |
with: | |
repository: frc1678/schema | |
path: schema | |
token: ${{ secrets.ACCESS_TOKEN }} | |
persist-credentials: true | |
- name: Checkout Submodule | |
run: | | |
git submodule init | |
git submodule update | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Python Dependencies | |
run: python3.8 -m pip install -r requirements.txt | |
- name: Install MongoDB | |
run: | | |
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
- name: Add Competition Code | |
run: mkdir data && echo 2020caln > data/competition.txt | |
- name: Start mongod | |
run: | | |
python3 src/start_mongod.py | |
# Run pytest with and without always resetting the cloud db to ensure | |
# that resetting the Cloud DB only on marked tests does not | |
# harm test independence | |
- name: Run `pytest` | |
run: pytest | |
- name: Run `pytest` and always reset cloud | |
run: pytest --always-reset-cloud |