Skip to content

Commit

Permalink
Create reusable GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Sep 10, 2023
1 parent 546808c commit 708397c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true
jobs:
setup:
uses: ./.github/workflows/setup.yml
build:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

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

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

- name: Run linter
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
tags:
- "*"
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
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Setup
on:
workflow_call:
inputs:
secrets:
jobs:
setup:
name: Clone app and setup Python
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3

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

0 comments on commit 708397c

Please sign in to comment.