-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade actions and code to python 3.11
- Loading branch information
Showing
5 changed files
with
79 additions
and
20 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 |
---|---|---|
@@ -1,24 +1,21 @@ | ||
name: Build and release | ||
name: Bump package version and publish to pypi | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
workflow_call: | ||
|
||
jobs: | ||
Test: | ||
runs-on: ubuntu-20.04 | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
python-version: "3.11" | ||
|
||
- name: Install python dependencies | ||
run: | | ||
|
@@ -28,21 +25,15 @@ jobs: | |
- name: Show python dependencies | ||
run: | | ||
python3 --version | ||
pip freeze | ||
- name: Run tests | ||
run: | | ||
./run-tests.sh | ||
- name: Build package | ||
if: ${{ success() && github.event_name == 'push' }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package | ||
if: ${{ success() && github.event_name == 'push' }} | ||
uses: pypa/[email protected] | ||
uses: pypa/[email protected] | ||
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,10 @@ | ||
name: Pull request master | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
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,16 @@ | ||
name: Pull request master | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
python3_tests: | ||
uses: ./.github/workflows/test-python-3.yml | ||
|
||
bump_version: | ||
needs: [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,42 @@ | ||
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 | ||
pip install -e .[tests,opensearch2] | ||
- name: Show python dependencies | ||
run: | | ||
python3 --version | ||
pip freeze | ||
- 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