mirror of
https://github.com/pypiserver/pypiserver
synced 2024-11-09 16:45:51 +01:00
Upgrade GitHub Actions (#447)
* Upgrade GitHub Actions * Update ci.yml * Update ci.yml * Drop Python 3.11-dev * Re-add Python 3.6 * Re-add py36
This commit is contained in:
parent
249cc6c7c4
commit
6ea316c4c1
73
.github/workflows/ci.yml
vendored
73
.github/workflows/ci.yml
vendored
@ -15,57 +15,35 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-cpython:
|
test-python:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# Commented out as tests with tox on python3.9 fail with updated dependencies.
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3.9"] # "3.11-dev"
|
||||||
# See https://github.com/pypiserver/pypiserver/issues/406.
|
|
||||||
# uncomment when the issue #406 is resolved.
|
|
||||||
# python-version: ["3.6", "3.7", "3.8", "3.9"]
|
|
||||||
python-version: ["3.6", "3.7", "3.8"]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install tox
|
run: pip install tox
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
# Create a tox env specification by stripping the dot out of the version
|
run: tox -e py
|
||||||
# specification and appending it to "py"
|
|
||||||
run: |
|
|
||||||
tox -e "py$(echo ${{ matrix.python-version }} | tr -d .)"
|
|
||||||
|
|
||||||
test-pypy:
|
|
||||||
# Run a a separate job so we don't need to mess with conditionally
|
|
||||||
# splitting the python version from the build matrix. Also the pypy
|
|
||||||
# tests take freaking forever.
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: pypy3
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install tox
|
|
||||||
- name: Run tests
|
|
||||||
run: tox -e pypy3
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
# These checks only need to be done once, not for every python version we s
|
# These checks only need to be done once, not for every python version we
|
||||||
# upport
|
# support
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
# Pretty much any python version will do
|
# Use the current version of Python
|
||||||
python-version: "3.9"
|
python-version: "3.x"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install -r "requirements/dev.pip"
|
pip install -r "requirements/dev.pip"
|
||||||
@ -92,12 +70,12 @@ jobs:
|
|||||||
test-docker:
|
test-docker:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
# Pretty much any python version will do
|
# Use the current version of Python
|
||||||
python-version: "3.9"
|
python-version: "3.x"
|
||||||
- name: Install test dependencies
|
- name: Install test dependencies
|
||||||
run: pip install -r "requirements/test.pip"
|
run: pip install -r "requirements/test.pip"
|
||||||
- name: Install package
|
- name: Install package
|
||||||
@ -110,8 +88,7 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- "check"
|
- "check"
|
||||||
- "test-docker"
|
- "test-docker"
|
||||||
- "test-cpython"
|
- "test-python"
|
||||||
- "test-pypy"
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Everything is good!"
|
- name: "Everything is good!"
|
||||||
run: "echo true"
|
run: "echo true"
|
||||||
@ -128,10 +105,10 @@ jobs:
|
|||||||
if: startsWith(github.event.ref, 'refs/tags/v')
|
if: startsWith(github.event.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Build distribution _wheel_.
|
- name: Build distribution _wheel_.
|
||||||
run: |
|
run: |
|
||||||
@ -151,11 +128,11 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- "tests"
|
- "tests"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v2"
|
- uses: "actions/checkout@v3"
|
||||||
|
|
||||||
- uses: "actions/setup-python@v2"
|
- uses: "actions/setup-python@v4"
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.x"
|
||||||
|
|
||||||
# This script prints a JSON array of needed docker tags, depending on the
|
# This script prints a JSON array of needed docker tags, depending on the
|
||||||
# ref. That array is then used to construct the matrix of the
|
# ref. That array is then used to construct the matrix of the
|
||||||
@ -188,10 +165,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
tag: "${{ fromJson(needs.docker-determine-tags.outputs.tags) }}"
|
tag: "${{ fromJson(needs.docker-determine-tags.outputs.tags) }}"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v2"
|
- uses: "actions/checkout@v3"
|
||||||
|
|
||||||
- name: "Cache Docker layers"
|
- name: "Cache Docker layers"
|
||||||
uses: "actions/cache@v2"
|
uses: "actions/cache@v3"
|
||||||
with:
|
with:
|
||||||
path: "/tmp/.buildx-cache"
|
path: "/tmp/.buildx-cache"
|
||||||
key: "${{ runner.os }}-buildx-${{ github.sha }}"
|
key: "${{ runner.os }}-buildx-${{ github.sha }}"
|
||||||
|
2
tox.ini
2
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py36, py37, py38, py39, pypy3
|
envlist = py36, py37, py38, py39, py310, py311, pypy3
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=-r{toxinidir}/requirements/test.pip
|
deps=-r{toxinidir}/requirements/test.pip
|
||||||
|
Loading…
Reference in New Issue
Block a user