mirror of
https://github.com/enpaul/vault2vault.git
synced 2024-11-28 04:49:42 +00:00
77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
|
---
|
||
|
name: CI
|
||
|
on:
|
||
|
pull_request:
|
||
|
types: ["opened", "synchronize"]
|
||
|
push:
|
||
|
branches: ["devel"]
|
||
|
jobs:
|
||
|
Test:
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
python:
|
||
|
- version: "3.6"
|
||
|
toxenv: py36
|
||
|
- version: "3.7"
|
||
|
toxenv: py37
|
||
|
- version: "3.8"
|
||
|
toxenv: py38
|
||
|
- version: "3.9"
|
||
|
toxenv: py39
|
||
|
- version: "3.10"
|
||
|
toxenv: py310
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Install Python ${{ matrix.python.version }}
|
||
|
uses: actions/setup-python@v1
|
||
|
with:
|
||
|
python-version: ${{ matrix.python.version }}
|
||
|
- name: Configure Job Cache
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cache/pip
|
||
|
~/.cache/pypoetry/cache
|
||
|
~/.poetry
|
||
|
# Including the hashed poetry.lock in the cache slug ensures that the cache
|
||
|
# will be invalidated, and thus all packages will be redownloaded, if the
|
||
|
# lockfile is updated
|
||
|
key: ${{ runner.os }}-${{ matrix.python.toxenv }}-${{ hashFiles('**/poetry.lock') }}
|
||
|
- name: Configure Path
|
||
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||
|
- name: Configure Environment
|
||
|
run: .github/scripts/setup-env.sh
|
||
|
- name: Run Toxenv ${{ matrix.python.toxenv }}
|
||
|
run: poetry run tox -e ${{ matrix.python.toxenv }}
|
||
|
Check:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Install Python 3.8
|
||
|
uses: actions/setup-python@v1
|
||
|
with:
|
||
|
python-version: 3.8
|
||
|
- name: Configure Job Cache
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.cache/pip
|
||
|
~/.cache/pypoetry/cache
|
||
|
~/.poetry
|
||
|
# Hardcoded 'py38' slug here lets this cache piggyback on the 'py38' cache
|
||
|
# that is generated for the tests above
|
||
|
key: ${{ runner.os }}-py38-${{ hashFiles('**/poetry.lock') }}
|
||
|
- name: Configure Path
|
||
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||
|
- name: Configure Environment
|
||
|
run: .github/scripts/setup-env.sh
|
||
|
- name: Run Static Analysis Checks
|
||
|
run: poetry run tox -e static
|
||
|
- name: Run Static Analysis Checks (Tests)
|
||
|
run: poetry run tox -e static-tests
|
||
|
- name: Run Security Checks
|
||
|
run: poetry run tox -e security
|