Skip to content

Commit

Permalink
👷 Improve CI/CD dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
spapanik committed Jul 11, 2024
1 parent 1ac4441 commit 9cac2cc
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: Gr1N/setup-poetry@v9
- name: Install cli tools
run: |
python -m pip install --upgrade phosphorus yamk
- name: Use cache
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('pyproject.toml') }}
path: ~/.cache/venv-${{ matrix.python-version }}-lint
key: ${{ runner.os }}-${{ matrix.python-version }}-lint-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel yamk
. $(poetry env use python | tail -n 1 | cut -d' ' -f3-)/bin/activate
python -m pip install --upgrade pip wheel
yam install
python -m venv ~/.cache/venv-${{ matrix.python-version }}-lint
. ~/.cache/venv-${{ matrix.python-version }}-lint/bin/activate
yam install -g main -g lint -g test
- name: Lint the project
run: |
. $(poetry env use python | tail -n 1 | cut -d' ' -f3-)/bin/activate
yam lint
. ~/.cache/venv-${{ matrix.python-version }}-lint/bin/activate
yam -e lint
run-unittests:
runs-on: ubuntu-latest
strategy:
Expand All @@ -58,20 +58,20 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: Gr1N/setup-poetry@v9
- name: Install cli tools
run: |
python -m pip install --upgrade phosphorus yamk
- name: Use cache
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('pyproject.toml') }}
path: ~/.cache/venv-${{ matrix.python-version }}-test
key: ${{ runner.os }}-${{ matrix.python-version }}-test-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel yamk
. $(poetry env use python | tail -n 1 | cut -d' ' -f3-)/bin/activate
python -m pip install --upgrade pip wheel
yam install
- name: Lint the project
python -m venv ~/.cache/venv-${{ matrix.python-version }}-test
. ~/.cache/venv-${{ matrix.python-version }}-test/bin/activate
yam install -g main -g test
- name: Test the project
run: |
. $(poetry env use python | tail -n 1 | cut -d' ' -f3-)/bin/activate
yam tests
. ~/.cache/venv-${{ matrix.python-version }}-test/bin/activate
yam -e tests

0 comments on commit 9cac2cc

Please sign in to comment.