Skip to content

Commit

Permalink
Split release and test actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stilvoid committed Oct 7, 2021
1 parent 0688c45 commit 60ee1f3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,6 @@ on:
name: Create release from tag

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r requirements.txt
pip install tox-gh-actions
- name: Run tests
run: tox

release:
name: Release
runs-on: ubuntu-latest
Expand All @@ -53,19 +29,13 @@ jobs:
- name: Build
run: |
python setup.py sdist bdist_wheel
ls -R
#- name: Publish
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: twine upload dist/*
- uses: actions/download-artifact@v2
with:
name: dist
path: dist

- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches: [ master ]

name: Test commits to master

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r requirements.txt
pip install tox-gh-actions
- name: Run tests
run: tox

0 comments on commit 60ee1f3

Please sign in to comment.