Skip to content

Commit

Permalink
gh-actions: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Sep 17, 2024
1 parent 7f02312 commit 778a541
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 39 deletions.
15 changes: 0 additions & 15 deletions .github/actions/install-python-dependencies/action.yml

This file was deleted.

38 changes: 14 additions & 24 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.6]
include:
- python: python3.6
pip: pip3
- python: python2
pip: pip

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python
uses: actions/[email protected]
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ github.sha }}

- name: Install python dependencies
uses: ./.github/actions/install-python-dependencies
run: |
${{ matrix.pip }} install --user --upgrade pip
${{ matrix.pip }} --no-cache-dir install --user setuptools wheel py coveralls
${{ matrix.pip }} --no-cache-dir install --user -e .[tests]
- name: Show python dependencies
run: pip freeze
run: |
${{ matrix.python }} --version
${{ matrix.pip }} freeze
- name: Run tests
uses: ./.github/actions/run-tests
Expand Down Expand Up @@ -67,17 +64,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 2.7
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 2.7

- name: Cache Python Dependencies
uses: actions/[email protected]
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-2.7-${{ github.sha }}
python-version: 3.x

- name: Install python dependencies
uses: ./.github/actions/install-python-dependencies
Expand Down

0 comments on commit 778a541

Please sign in to comment.