Skip to content

Commit

Permalink
Add cache to base CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chase9 committed Apr 17, 2024
1 parent df0f785 commit 4e29fd2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Release App
name: Build and Release Yin-Yang

on:
push:
Expand Down Expand Up @@ -36,10 +36,12 @@ jobs:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
# Install dependencies of cache does not exist
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Install system dependencies
run: |
sudo apt install qt6-base-dev libsystemd-dev gcc
- name: Install Poetry dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --no-interaction
# Compile and build Yin-Yang
- name: Compile ui, translations and resources
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ jobs:
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Cache packages
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
# This path is specific to ubuntu
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
# Install dependencies
- name: Install system dependencies
run: |
sudo apt install qt6-base-dev libsystemd-dev gcc
poetry install
- name: Install Poetry dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --no-interaction
# Build and test Yin-Yang
- name: Compile ui, translations and resources
run: poetry run ./scripts/build_ui.sh
- name: Lint with flake8
Expand Down

0 comments on commit 4e29fd2

Please sign in to comment.