Skip to content

Merge pull request #279 from microbiomedata/256-configure-and-deploy-… #864

Merge pull request #279 from microbiomedata/256-configure-and-deploy-…

Merge pull request #279 from microbiomedata/256-configure-and-deploy-… #864

Workflow file for this run

# 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/