Merge pull request #308 from microbiomedata/307-watcher-incorrect-han… #990
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: CI | |
on: | |
push: | |
permissions: | |
contents: read | |
jobs: | |
build_lint_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure Docker configuration directory exists | |
run: | | |
sudo mkdir -p /etc/docker | |
- name: Set up Docker Hub mirror | |
run: | | |
echo '{"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]}' | sudo tee /etc/docker/daemon.json | |
sudo systemctl restart docker | |
- name: setup_mongodb | |
uses: supercharge/[email protected] | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.9" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 nmdc_automation --exit-zero --statistics --tee --output-file flake8stats.txt | |
- name: Test with pytest | |
run: | | |
poetry run pytest ./tests --junit-xml=pytest.xml --cov-report=term \ | |
--cov-report=xml --cov=nmdc_automation --local-badge-output-dir badges/ |