Add md5 hash to resource, to be used for fix_attachment_reference #60
Workflow file for this run
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: tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '*.*' | |
paths-ignore: | |
- "*.md" | |
- ".pre-commit-config.yaml" | |
- "pyproject.toml" | |
- "**/version.py" | |
env: | |
BUILD_POETRY_VERSION: 1.2.2 | |
PACKAGE_NAME: evernote_backup | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Load cached Poetry installation | |
if: matrix.os != 'windows-latest' | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local | |
key: dotlocal-${{ matrix.os }}-${{ matrix.python-version }}-${{ env.BUILD_POETRY_VERSION }} | |
- name: Install Poetry ${{ env.BUILD_POETRY_VERSION }} | |
uses: snok/[email protected] | |
with: | |
version: ${{ env.BUILD_POETRY_VERSION }} | |
installer-parallel: false | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
shell: bash | |
run: poetry install --no-interaction --no-root | |
- name: Run tests | |
shell: bash | |
run: poetry run pytest --cov-report=xml --cov=${{ env.PACKAGE_NAME }} tests/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |