Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI to GH actions #4924

Merged
merged 41 commits into from Jan 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2f740b2
Run most CI processes on GH actions
elacuesta Dec 11, 2020
b7337e9
CI: Pin python version
elacuesta Dec 11, 2020
ccd78a7
Update CI
elacuesta Dec 11, 2020
e8851d1
Update CI
elacuesta Dec 11, 2020
9530784
Update CI
elacuesta Dec 11, 2020
1aba857
Update CI
elacuesta Dec 11, 2020
6b3e1c3
Update CI
elacuesta Dec 11, 2020
b6fe5c3
Download specific pypy version
elacuesta Dec 11, 2020
c0bc167
Virtualenv creation
elacuesta Dec 11, 2020
937c510
pypy3 adjustments
elacuesta Dec 12, 2020
2513db9
pypy3 adjustments
elacuesta Dec 12, 2020
29769de
pypy3 adjustments
elacuesta Dec 12, 2020
7b778e3
Update depencencies
elacuesta Dec 10, 2020
93f079a
Merge branch 'test-ci' into tests-github-actions
elacuesta Dec 14, 2020
a5088c4
Enable test envs with pinned dependencies
elacuesta Dec 14, 2020
7045d2c
Install system libraries for pinned envs
elacuesta Dec 14, 2020
3143791
Install system libraries only for ubuntu-based envs
elacuesta Dec 14, 2020
22fce67
Remove travis config file
elacuesta Dec 15, 2020
f742093
Merge branch 'tox-pip20.2' into tests-github-actions
elacuesta Dec 15, 2020
abeb7dd
Restore minimum pyOpenSSL version
elacuesta Dec 15, 2020
b261f52
Restore minimum cryptography version
elacuesta Dec 15, 2020
f0dbc08
Restore test requirements
elacuesta Dec 15, 2020
5909d89
Restore pywin32 requirement
elacuesta Dec 15, 2020
3cb1dc6
Disable test under pypy
elacuesta Dec 16, 2020
fc5070f
Upload coverage report from CI
elacuesta Dec 16, 2020
eb961ac
Remove install_command from tox.ini
elacuesta Dec 16, 2020
18bf452
Merge branch 'master' into tests-github-actions
elacuesta Dec 24, 2020
af4c396
Update build badge on README
elacuesta Dec 24, 2020
f8d6b01
Split CI config files
elacuesta Dec 28, 2020
ac3e6f5
Install system libraries in pinned env
elacuesta Dec 28, 2020
abd1092
Fix typo
elacuesta Dec 28, 2020
5458a8f
Publish CI job does not depend on previous jobs
elacuesta Dec 28, 2020
c44a61d
Remove job names
elacuesta Dec 28, 2020
5d61e6b
Remove workflow names
elacuesta Dec 28, 2020
215ccde
Restore workflow names
elacuesta Dec 28, 2020
e1420ea
Update workflow names
elacuesta Dec 28, 2020
51f18d6
Update CI badges on Readme
elacuesta Dec 30, 2020
26a5624
Do not install zstandard on pypy
elacuesta Dec 30, 2020
0f8de90
Add macOS build to CI
elacuesta Dec 30, 2020
9eb2b17
Shorter names for CI jobs
elacuesta Dec 30, 2020
988d733
Update Readme badges
elacuesta Dec 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/checks.yml
@@ -0,0 +1,38 @@
name: Checks
on: [push, pull_request]

jobs:
checks:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- python-version: 3.8
env:
TOXENV: security
- python-version: 3.8
env:
TOXENV: flake8
- python-version: 3.8
env:
TOXENV: pylint
- python-version: 3.8
env:
TOXENV: typing
- python-version: 3.7 # Keep in sync with .readthedocs.yml
env:
TOXENV: docs

steps:
- uses: actions/checkout@v2

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

- name: Run check
env: ${{ matrix.env }}
run: |
pip install -U tox
tox
31 changes: 0 additions & 31 deletions .github/workflows/main.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,31 @@
name: Publish
on: [push]

jobs:
publish:
runs-on: ubuntu-18.04
if: startsWith(github.event.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Check Tag
id: check-release-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then
echo ::set-output name=release_tag::true
fi

- name: Publish to PyPI
if: steps.check-release-tag.outputs.release_tag == 'true'
run: |
pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
twine upload dist/*
25 changes: 25 additions & 0 deletions .github/workflows/tests-macos.yml
@@ -0,0 +1,25 @@
name: macOS
on: [push, pull_request]

jobs:
tests:
runs-on: macos-10.15
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2

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

- name: Run tests
run: |
pip install -U tox
tox -e py

- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
69 changes: 69 additions & 0 deletions .github/workflows/tests-ubuntu.yml
@@ -0,0 +1,69 @@
name: Ubuntu
on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- python-version: 3.7
env:
TOXENV: py
- python-version: 3.8
env:
TOXENV: py
- python-version: pypy3
env:
TOXENV: pypy3
PYPY_VERSION: 3.6-v7.3.1

# pinned deps
- python-version: 3.6.12
env:
TOXENV: pinned
- python-version: 3.6.12
env:
TOXENV: asyncio-pinned
- python-version: pypy3
env:
TOXENV: pypy3-pinned
PYPY_VERSION: 3.6-v7.2.0

# extras
- python-version: 3.8
env:
TOXENV: extra-deps
- python-version: 3.8
env:
TOXENV: asyncio

steps:
- uses: actions/checkout@v2

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

- name: Install system libraries
if: matrix.python-version == 'pypy3' || contains(matrix.env.TOXENV, 'pinned')
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxslt-dev

- name: Run tests
env: ${{ matrix.env }}
run: |
if [[ ! -z "$PYPY_VERSION" ]]; then
export PYPY_VERSION="pypy$PYPY_VERSION-linux64"
wget "https://downloads.python.org/pypy/${PYPY_VERSION}.tar.bz2"
tar -jxf ${PYPY_VERSION}.tar.bz2
$PYPY_VERSION/bin/pypy3 -m venv "$HOME/virtualenvs/$PYPY_VERSION"
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
fi
pip install -U tox
tox

- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
32 changes: 32 additions & 0 deletions .github/workflows/tests-windows.yml
@@ -0,0 +1,32 @@
name: Windows
on: [push, pull_request]

jobs:
tests:
runs-on: windows-latest
strategy:
matrix:
include:
- python-version: 3.6
env:
TOXENV: windows-pinned
- python-version: 3.7
env:
TOXENV: py
- python-version: 3.8
env:
TOXENV: py

steps:
- uses: actions/checkout@v2

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

- name: Run tests
env: ${{ matrix.env }}
run: |
pip install -U tox
tox
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

14 changes: 11 additions & 3 deletions README.rst
Expand Up @@ -10,9 +10,17 @@ Scrapy
:target: https://pypi.python.org/pypi/Scrapy
:alt: Supported Python Versions

.. image:: https://img.shields.io/travis/scrapy/scrapy/master.svg
:target: https://travis-ci.org/scrapy/scrapy
:alt: Build Status
.. image:: https://github.com/scrapy/scrapy/workflows/Ubuntu/badge.svg
:target: https://github.com/scrapy/scrapy/actions?query=workflow%3AUbuntu
:alt: Ubuntu

.. image:: https://github.com/scrapy/scrapy/workflows/macOS/badge.svg
:target: https://github.com/scrapy/scrapy/actions?query=workflow%3AmacOS
:alt: macOS

.. image:: https://github.com/scrapy/scrapy/workflows/Windows/badge.svg
:target: https://github.com/scrapy/scrapy/actions?query=workflow%3AWindows
:alt: Windows

.. image:: https://img.shields.io/badge/wheel-yes-brightgreen.svg
:target: https://pypi.python.org/pypi/Scrapy
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements-py3.txt
Expand Up @@ -14,6 +14,6 @@ uvloop; platform_system != "Windows"
# optional for shell wrapper tests
bpython
brotlipy # optional for HTTP compress downloader middleware tests
zstandard # optional for HTTP compress downloader middleware tests
zstandard; implementation_name != 'pypy' # optional for HTTP compress downloader middleware tests
ipython
pywin32; sys_platform == "win32"