Skip to content

Commit

Permalink
Merge pull request #240 from consideRatio/master
Browse files Browse the repository at this point in the history
ci: tweaks to align with modern practices and jupyterhub org in general
  • Loading branch information
consideRatio authored Apr 14, 2022
2 parents 2fc14bf + 0923197 commit 584cfc8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

#
name: Upload Python Package

on:
Expand All @@ -13,18 +13,26 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies

- name: install build package
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
pip install --upgrade pip
pip install build
pip freeze
- name: build release
run: |
python -m build --sdist --wheel .
ls -l dist
sha256sum dist/* | tee SHA256SUMS
- name: Publish to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
pip install twine
twine upload --skip-existing dist/*
24 changes: 15 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ name: Test

on:
pull_request:
paths-ignore:
- "**.md"
- "**.yml"
- "**.yaml"
- "!.github/workflows/test.yml"
push:
paths-ignore:
- "**.md"
- "**.yml"
- "**.yaml"
- "!.github/workflows/test.yml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:

jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v2.0.3

pytest:
name: "Run pytest"
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -53,7 +59,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
python-version: "${{ matrix.python-version }}"

- name: Install dependencies
run: |
Expand Down

0 comments on commit 584cfc8

Please sign in to comment.