Skip to content

Commit

Permalink
combine workflows in a single file for sequencing
Browse files Browse the repository at this point in the history
  • Loading branch information
indrajithi committed Jun 12, 2024
1 parent 96b45c6 commit 89b689a
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 83 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Lint and Test

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
pip install .
pip install pylint
- name: Run pylint
run: |
pylint $(git ls-files '*.py')
test:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
pip install .
- name: Run tests
run: |
pytest
deploy:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
25 changes: 0 additions & 25 deletions .github/workflows/pylint.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/python-publish.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 89b689a

Please sign in to comment.