-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split CI workflows in test and deploy
This makes them easier to maintain and follows how other pytest repositories have evolved. Also made some changes to the deploy workflow: * Using Python 3.10 * Using `build` package instead of calling `python setup.py`
- Loading branch information
1 parent
450b851
commit f5e652d
Showing
3 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
deploy: | ||
if: github.repository == 'pytest-dev/pytest' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade build | ||
- name: Build package | ||
run: python -m build | ||
|
||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
name: main | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
|
@@ -113,30 +111,3 @@ jobs: | |
env: | ||
CODECOV_NAME: ${{ matrix.name }} | ||
run: bash scripts/upload-coverage.sh -F GHA,${{ runner.os }} | ||
|
||
deploy: | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pluggy' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade wheel setuptools setuptools_scm | ||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters