-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
159 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
name: Publish to pypi | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install -e .[tests] | ||
- name: Show python dependencies | ||
run: | | ||
python3 --version | ||
pip freeze | ||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@v1.9.0 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
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,13 @@ | ||
name: Pull request master | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
python2_tests: | ||
uses: ./.github/workflows/test-python-2.yml | ||
|
||
python3_tests: | ||
uses: ./.github/workflows/test-python-3.yml |
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,19 @@ | ||
name: Pull request master | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
python2_tests: | ||
uses: ./.github/workflows/test-python-2.yml | ||
|
||
python3_tests: | ||
uses: ./.github/workflows/test-python-3.yml | ||
|
||
bump_version: | ||
needs: [python2_tests, python3_tests] | ||
uses: ./.github/workflows/publish.yml | ||
secrets: inherit | ||
|
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,41 @@ | ||
name: Test Python 2 | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- python: python2 | ||
pip: pip | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
fetch-depth: 0 | ||
|
||
- name: Install python dependencies | ||
run: | | ||
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py | ||
${{ matrix.python }} get-pip.py | ||
${{ matrix.python }} -m ${{ matrix.pip }} install --user --upgrade pip | ||
${{ matrix.python }} -m ${{ matrix.pip }} --no-cache-dir install --user setuptools wheel "urllib3==1.25.11" | ||
${{ matrix.python }} -m ${{ matrix.pip }} --no-cache-dir install git+https://github.com/inspirehep/dictdiffer.git#egg=dictdiffer | ||
${{ matrix.python }} -m ${{ matrix.pip }} --no-cache-dir install --user -e .[tests] | ||
- name: Show python dependencies | ||
run: | | ||
${{ matrix.python }} --version | ||
${{ matrix.pip }} freeze | ||
- name: Run flake8 checks | ||
shell: bash | ||
run: flake8 inspire_json_merger tests | ||
|
||
- name: Run tests | ||
run: | | ||
./run-tests.sh |
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,47 @@ | ||
name: Test Python 3 | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
experimental: [false] | ||
include: | ||
- python-version: "3.x" | ||
check-latest: true | ||
experimental: true | ||
|
||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install setuptools | ||
pip install -e .[tests] | ||
- name: Show python dependencies | ||
run: | | ||
python3 --version | ||
pip freeze | ||
- name: Run flake8 checks | ||
shell: bash | ||
run: flake8 inspire_json_merger tests | ||
|
||
- name: Run tests | ||
run: | | ||
./run-tests.sh |