test ats triggers - remove random files (#16) #45
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 variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build-Test-Upload | |
on: [push] # Run on any push event | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black==22.3.0 isort==5.10.1 | |
- name: Check linting with black | |
run: | | |
black --check . | |
- name: Check imports order with isort | |
run: | | |
isort --check --profile=black . | |
codecov-startup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v3 | |
- name: Install CLI | |
run: | | |
pip install codecov-cli | |
- name: Create commit in codecov | |
run: | | |
codecovcli create-commit --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --git-service github | |
- name: Create commit report in codecov | |
run: | | |
codecovcli create-report --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --git-service github | |
build-test-upload: | |
runs-on: ubuntu-latest | |
needs: codecov-startup | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 2 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Test with pytest | |
run: | | |
pytest --cov | |
- name: Upload to codecov | |
run: | | |
pip install codecov-cli | |
codecovcli do-upload --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag unit |