-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (51 loc) · 1.81 KB
/
pre-merge.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: pre-merge
on:
push:
branches: [ devel ]
pull_request:
branches: [ devel ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.8", "3.10"]
include:
- python-version: "3.8"
python-py-version: "py38"
- python-version: "3.10"
python-py-version: "py310"
container:
image: ghcr.io/${{ github.repository }}:${{ matrix.python-py-version }}-poetry-bullseye
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Python Version
run: python3 --version
- name: Poetry Venv Dir
run: |
echo "VENV_DIR=$(poetry config virtualenvs.path)" >> $GITHUB_ENV
- name: Restore the Cache
id: cache-deps
uses: actions/cache@v3
with:
path: ${{ env.VENV_DIR }}
# bump the suffix if you need to force-refresh the cache
key: streamlit-parameters-cache-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock', '**/tox.ini') }}-1
# Install all deps, sans the project (--no-root)
- name: Poetry - Install Dependencies
run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
# Project is installed separately to avoid always invalidating the cache
- name: Poetry - Install Project
run: poetry install --no-interaction
- name: Tox - Tests
run: poetry run tox --workdir ${{ env.VENV_DIR }} -e ${{ matrix.python-py-version }}
- name: Tox - Formatters, Linters
run: poetry run tox --workdir ${{ env.VENV_DIR }} -e check
- name: Froody
run: echo I am froody, you should be too