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 90f2ba8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 57 deletions.
15 changes: 0 additions & 15 deletions .github/actions/install-python-dependencies/action.yml

This file was deleted.

56 changes: 15 additions & 41 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,35 @@ on:

jobs:
Test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [2.7, 3.6]
include:
- python: python3
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

- name: Coveralls
uses: AndreMiras/coveralls-python-action@v20201129
with:
parallel: true
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.test_number }}

Coveralls:
needs: Test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@v20201129
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

Release:
if: ${{ github.event_name == 'push' }}
Expand All @@ -67,17 +48,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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
]

install_requires = [
'pyyaml',
'pyyaml>=6.0,<7.0',
'autosemver==0.5.5',
'isort<5.0.0',
'six',
Expand Down

0 comments on commit 90f2ba8

Please sign in to comment.