Using get_template(name=) instead of get_template_by_name in doc to keep up with code. #50
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: Run on push, and pull-request | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8] | |
steps: | |
# Checkout the code from the repo | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
# Setup the python version, and dependencies | |
- name: Set Up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Installing and configuring poetry | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.5.1 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cache venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies (if no cache) | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction | |
# Linting | |
- name: Run flake8 | |
run: poetry run flake8 . | |
- name: Run black formatting check | |
run: poetry run black --diff --check | |
# Running tests | |
- name: Running tests | |
run: poetry run pytest tests/ -v | |
- name: Running tests (with coverage) | |
run: poetry run pytest --cov-report=xml --cov=gns3fy tests | |
# Codecov coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
fail_ci_if_error: true | |
#- name: Upload to codecov | |
# run: poetry run pytest --cov-report=xml --cov=gns3fy tests/ |