Skip to content

Commit

Permalink
Fix workflows, even if it makes them not DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Sep 10, 2023
1 parent 6962156 commit cad8bfc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true
jobs:
setup:
uses: ./.github/workflows/setup.yml
build:
name: Lint and Test
ci:
if: !startsWith(github.ref, 'refs/tags')
name: Build, Lint, Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install test/lint dependencies
run: pip install pytest pylint

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
# Adapted from: https://github.com/pypa/gh-action-pypi-publish#usage
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Upload release to PyPI
name: Build, Lint, Test, Release to PyPI
runs-on: ubuntu-latest
environment:
name: release
Expand All @@ -25,6 +25,15 @@ jobs:
with:
python-version: 3.9

- name: Install test/lint dependencies
run: pip install pytest pylint

- name: Run linter
run: pylint plover_q_and_a

- name: Run tests
run: pytest

- name: Install build
run: python -m pip install --upgrade build

Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/setup.yml

This file was deleted.

0 comments on commit cad8bfc

Please sign in to comment.