Skip to content

Merge pull request #853 from microbiomedata/issue-837 #945

Merge pull request #853 from microbiomedata/issue-837

Merge pull request #853 from microbiomedata/issue-837 #945

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://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
# Note: The following events will trigger this workflow:
# 1. Someone pushes a commit to `main` that includes changes to any of the listed files.
# 2. Someone opens a pull request that includes changes to any of the listed files.
# 3. Someone clicks the "Run workflow" button on the "Actions" tab on GitHub.
#
# References:
# - https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#example-including-paths
# - https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
#
on:
push:
branches: [ main ]
paths:
- '.github/workflows/python-app.yml'
- 'Makefile'
- '**.Dockerfile'
- '**.py'
- 'requirements/main.txt'
# Every file in the `data` directory or in any of its subdirectories:
- 'metadata-translation/notebooks/data/**'
pull_request:
paths:
- '.github/workflows/python-app.yml'
- 'Makefile'
- '**.Dockerfile'
- '**.py'
- 'requirements/main.txt'
- 'metadata-translation/notebooks/data/**'
# Allow developers to trigger this workflow manually via the "Actions" page on GitHub.
# Reference: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch: { }
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # update version to maintain consistency across workflows
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
# deprecated: Consider merging python.app.yml and lint.yml
# - name: Lint with flake8
# run: |
# pip install flake8
# make lint
- name: Test with pytest
run: |
make up-test
make test