Update python version and dependencies #59
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: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1.3.3 | |
with: | |
version: 1.7.1 | |
virtualenvs-create: false | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi | |
- name: Commit files and push | |
env: | |
CI_USER: ${{ secrets.USERNAME }} | |
CI_EMAIL: ${{ secrets.EMAIL }} | |
GITHUB_REPOSITORY: ${{ secrets.REPOSITORY }} | |
EDITOR: true | |
run: | | |
if [ git diff --exit-code ] | |
then | |
git config --local user.email "$CI_EMAIL" | |
git config --local user.name "$CI_USER" | |
git commit -a --fixup HEAD | |
git rebase -i HEAD~2 --autosquash | |
git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:master --force-with-lease | |
fi | |
- name: Test with pytest | |
run: | | |
python -m pytest --verbose --cov=geneal --cov=tests --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false |