Bump gitpython from 3.1.27 to 3.1.32 #181
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 CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
name: Lint Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install Lava | |
run: poetry install --no-interaction | |
- name: Run flakeheaven (flake8) | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: | | |
source $VENV | |
flakeheaven lint src/lava tests/ | |
- name: Run flakeheaven (flake8) | |
if: runner.os == 'Windows' | |
run: | | |
.venv\Scripts\activate.ps1 | |
flakeheaven lint src/lava tests/ | |
security-lint: | |
name: Security Lint Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install Lava | |
run: poetry install --no-interaction | |
- name: Run bandit | |
uses: tj-actions/[email protected] | |
with: | |
targets: | | |
src/lava/. | |
options: "-r --format custom --msg-template '{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}'" | |
unit-tests: | |
name: Unit Test Code + Coverage | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install Lava | |
run: poetry install --no-interaction | |
- name: Run unit tests | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: | | |
git lfs fetch | |
git lfs pull | |
source $VENV | |
python3 -m pip install ipykernel | |
pytest | |
- name: Run unit tests | |
if: runner.os == 'Windows' | |
run: | | |
.venv\Scripts\activate.ps1 | |
python3 -m pip install ipykernel | |
pytest |