ci: re-add cache

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-14 19:14:18 +01:00
parent 59343ff441
commit 4d4193a586
2 changed files with 72 additions and 65 deletions

View File

@ -25,14 +25,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- name: run pylint - name: run pylint
run: pipenv run pylint authentik tests lifecycle run: pipenv run pylint authentik tests lifecycle
@ -43,14 +43,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- name: run black - name: run black
run: pipenv run black --check authentik tests lifecycle run: pipenv run black --check authentik tests lifecycle
@ -61,14 +61,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- name: run isort - name: run isort
run: pipenv run isort --check authentik tests lifecycle run: pipenv run isort --check authentik tests lifecycle
@ -79,14 +79,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- name: run bandit - name: run bandit
run: pipenv run bandit -r authentik tests lifecycle run: pipenv run bandit -r authentik tests lifecycle
@ -113,14 +113,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- name: run migrations - name: run migrations
run: pipenv run python -m lifecycle.migrate run: pipenv run python -m lifecycle.migrate
@ -137,11 +137,11 @@ jobs:
id: ev id: ev
run: | run: |
python ./scripts/gh_env.py python ./scripts/gh_env.py
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: checkout stable - name: checkout stable
run: | run: |
# Copy current, latest config to local # Copy current, latest config to local
@ -150,8 +150,8 @@ jobs:
git checkout ${{ steps.ev.outputs.branchName }} -- .github git checkout ${{ steps.ev.outputs.branchName }} -- .github
git checkout ${{ steps.ev.outputs.branchName }} -- scripts git checkout ${{ steps.ev.outputs.branchName }} -- scripts
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: | run: |
scripts/ci_prepare.sh scripts/ci_prepare.sh
# Sync anyways since stable will have different dependencies # Sync anyways since stable will have different dependencies
@ -165,8 +165,8 @@ jobs:
git checkout ${{ steps.ev.outputs.branchName }} git checkout ${{ steps.ev.outputs.branchName }}
pipenv sync --dev pipenv sync --dev
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- name: migrate to latest - name: migrate to latest
run: pipenv run python -m lifecycle.migrate run: pipenv run python -m lifecycle.migrate
@ -177,14 +177,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- uses: testspace-com/setup-testspace@v1 - uses: testspace-com/setup-testspace@v1
with: with:
@ -206,14 +206,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: scripts/ci_prepare.sh run: scripts/ci_prepare.sh
- uses: testspace-com/setup-testspace@v1 - uses: testspace-com/setup-testspace@v1
with: with:
@ -245,14 +245,14 @@ jobs:
- uses: testspace-com/setup-testspace@v1 - uses: testspace-com/setup-testspace@v1
with: with:
domain: ${{github.repository_owner}} domain: ${{github.repository_owner}}
# - id: cache-pipenv - id: cache-pipenv
# uses: actions/cache@v2.1.6 uses: actions/cache@v2.1.6
# with: with:
# path: ~/.local/share/virtualenvs path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }} key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
# env: env:
# INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }} INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: | run: |
scripts/ci_prepare.sh scripts/ci_prepare.sh
docker-compose -f tests/e2e/docker-compose.yml up -d docker-compose -f tests/e2e/docker-compose.yml up -d

View File

@ -21,7 +21,14 @@ jobs:
- uses: actions/setup-python@v2 - uses: actions/setup-python@v2
with: with:
python-version: '3.9' python-version: '3.9'
- id: cache-pipenv
uses: actions/cache@v2.1.6
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-v2-${{ hashFiles('**/Pipfile.lock') }}
- name: prepare - name: prepare
env:
INSTALL: ${{ steps.cache-pipenv.outputs.cache-hit }}
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y gettext sudo apt-get install -y gettext