-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from my8100/bugfix_scrapyd_v150
Bugfix scrapyd v150
- Loading branch information
Showing
43 changed files
with
154 additions
and
48 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
version: 2.1 | ||
orbs: | ||
codecov: codecov/[email protected] | ||
allure: ayte/[email protected] | ||
jobs: | ||
py39: &test-template | ||
docker: | ||
|
@@ -15,7 +16,7 @@ jobs: | |
default: false | ||
use-scrapyd-v143: | ||
type: boolean | ||
default: true | ||
default: false | ||
use-git: | ||
type: boolean | ||
default: false | ||
|
@@ -31,16 +32,46 @@ jobs: | |
use-mysql: | ||
type: boolean | ||
default: false | ||
allure-version: | ||
description: Allure version to use | ||
type: string | ||
default: 2.13.1 | ||
allure-configuration-path: | ||
description: Path to Allure configuration, uses default one if omitted | ||
type: string | ||
default: /usr/local/share/allure/config/allure.yml | ||
allure-target-path: | ||
description: Path for report directory | ||
type: string | ||
default: allure-report | ||
allure-results-path: | ||
description: Path to directory with test results | ||
type: string | ||
default: allure-results | ||
allure-artifact-path: | ||
description: Path that will be used when storing result as artifact | ||
type: string | ||
default: Report/Allure | ||
steps: | ||
- run: | ||
name: Install telnet | ||
command: | | ||
sudo apt-get update && sudo apt-get install telnet | ||
- run: | ||
name: Install Java 11 | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install -y openjdk-11-jdk | ||
- run: | ||
name: Set JAVA_HOME | ||
command: | | ||
echo "export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" >> $BASH_ENV | ||
source $BASH_ENV | ||
- run: | ||
name: Setup env | ||
command: | | ||
mkdir ~/logs | ||
ls -l ~ | ||
ls -la ~ | ||
- checkout | ||
- when: | ||
condition: <<parameters.is-py27>> | ||
|
@@ -154,11 +185,12 @@ jobs: | |
name: Run tests | ||
command: | | ||
pip list | ||
ls -l | ||
ls -la | ||
. venv/bin/activate | ||
flake8 . --count --exclude=./venv* --select=E9,F63,F7,F82 --show-source --statistics | ||
coverage erase | ||
coverage run --source=scrapydweb -m pytest tests -s -vv -l --disable-warnings | ||
# tests/test_schedule.py | ||
coverage run --source=scrapydweb -m pytest -s -vv -l --disable-warnings --alluredir=allure-results tests | ||
- run: | ||
name: Generate report | ||
command: | | ||
|
@@ -169,13 +201,66 @@ jobs: | |
coverage html | ||
coverage xml | ||
ls -la | ||
ls -la allure-results || echo 'ignore error' | ||
coveralls | ||
# https://discuss.circleci.com/t/make-custom-command-run-always-with-when-always/38957 | ||
# https://circleci.com/docs/configuration-reference/#the-when-attribute | ||
when: always | ||
- store_artifacts: | ||
path: htmlcov | ||
- store_artifacts: | ||
path: coverage.xml | ||
- codecov/upload: | ||
file: coverage.xml | ||
# https://circleci.com/developer/orbs/orb/codecov/codecov | ||
# - codecov/upload | ||
# https://circleci.com/developer/orbs/orb/coveralls/coveralls | ||
# - coveralls/upload | ||
# https://discuss.circleci.com/t/how-can-we-publish-pytest-results-to-circleci-using-allure-reports/37830/2 | ||
# https://circleci.com/developer/orbs/orb/ayte/allure | ||
# - allure/install | ||
# - allure/report | ||
# https://circleci.com/docs/configuration-reference/#the-when-step | ||
- when: | ||
condition: | ||
equal: [ 1, 1 ] | ||
steps: | ||
- run: | ||
name: Allure archive download | ||
command: >- | ||
curl -L https://github.com/allure-framework/allure2/releases/download/<< | ||
parameters.allure-version >>/allure-commandline-<< parameters.allure-version >>.zip -o | ||
/tmp/allure.zip | ||
when: always | ||
- run: | ||
name: Archive extraction | ||
command: unzip /tmp/allure.zip | ||
when: always | ||
- run: | ||
name: Allure installation | ||
command: sudo mv allure-<< parameters.allure-version >> /usr/local/share/allure | ||
when: always | ||
- run: | ||
name: Allure binary symlinking | ||
command: sudo ln -s /usr/local/share/allure/bin/allure /usr/local/bin/allure | ||
when: always | ||
- when: | ||
condition: | ||
equal: [ 1, 1 ] | ||
steps: | ||
- run: | ||
name: >- | ||
Allure report generation (<< parameters.allure-results-path >> -> << | ||
parameters.allure-target-path >>) | ||
command: | | ||
allure generate \ | ||
--config << parameters.allure-configuration-path >> \ | ||
--report-dir << parameters.allure-target-path >> \ | ||
<< parameters.allure-results-path >> | ||
when: always | ||
- store_artifacts: | ||
path: << parameters.allure-target-path >> | ||
destination: << parameters.allure-artifact-path >> | ||
py27: | ||
<<: *test-template | ||
docker: | ||
|
@@ -192,7 +277,7 @@ jobs: | |
<<: *test-template | ||
docker: | ||
- image: cimg/python:3.8 | ||
py39-scrapyd-latest: | ||
py39-scrapyd-v143: | ||
<<: *test-template | ||
docker: | ||
- image: cimg/python:3.9 | ||
|
@@ -274,10 +359,14 @@ jobs: | |
<<: *test-template | ||
docker: | ||
- image: cimg/python:3.12 | ||
py312-scrapyd-latest: | ||
py312-scrapyd-v143: | ||
<<: *test-template | ||
docker: | ||
- image: cimg/python:3.12 | ||
py313: | ||
<<: *test-template | ||
docker: | ||
- image: cimg/python:3.13 | ||
workflows: | ||
test: | ||
jobs: | ||
|
@@ -287,8 +376,8 @@ workflows: | |
# - py37 | ||
- py38 | ||
- py39 | ||
- py39-scrapyd-latest: | ||
use-scrapyd-v143: false | ||
- py39-scrapyd-v143: | ||
use-scrapyd-v143: true | ||
- py310-git-postgresql: | ||
use-git: true | ||
use-postgresql: true | ||
|
@@ -304,5 +393,6 @@ workflows: | |
use-mysql: true | ||
- py311 | ||
- py312 | ||
- py312-scrapyd-latest: | ||
use-scrapyd-v143: false | ||
- py312-scrapyd-v143: | ||
use-scrapyd-v143: true | ||
- py313 |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ scrapydweb_settings_v*.py | |
|
||
tests/*.html | ||
tests/data/ | ||
allure-results/ | ||
|
||
|
||
scrapydweb/data/* | ||
|
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ coverage | |
pytest | ||
# pytest-cov | ||
coveralls | ||
allure-pytest | ||
|
||
scrapy | ||
scrapyd | ||
|
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
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,7 +1,7 @@ | ||
# coding: utf-8 | ||
|
||
__title__ = 'scrapydweb' | ||
__version__ = '1.5.1' | ||
__version__ = '1.5.2' | ||
__author__ = 'my8100' | ||
__author_email__ = '[email protected]' | ||
__url__ = 'https://github.com/my8100/scrapydweb' | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.