diff --git a/.github/workflows/nonlinux.yml b/.github/workflows/nonlinux.yml new file mode 100644 index 000000000..697cdaf1d --- /dev/null +++ b/.github/workflows/nonlinux.yml @@ -0,0 +1,25 @@ +name: CI (Non-Linux) +on: [push, pull_request] +jobs: + build: + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: 3.6 + cache: pip + cache-dependency-path: '**/requirements*.txt' + # Don't install editable projects in the current working directory. + # https://pip.pypa.io/en/latest/reference/pip_install/#install-src + - run: pip install --src $GITHUB_WORKSPACE/../src -r requirements_dev.txt + - env: + CI_SKIP: true + run: pytest -W error -rs --cov kingfisher_scrapy + - env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: coveralls --service=github diff --git a/tests/extensions/test_database_store.py b/tests/extensions/test_database_store.py index a629de2ac..ef6790b74 100644 --- a/tests/extensions/test_database_store.py +++ b/tests/extensions/test_database_store.py @@ -11,7 +11,7 @@ from tests import spider_with_crawler database_url = os.getenv('KINGFISHER_COLLECT_DATABASE_URL') -skip_test_if = not database_url and not os.getenv('CI') +skip_test_if = not database_url and (not os.getenv('CI') or os.getenv('CI_SKIP')) def test_from_crawler_missing_arguments(): diff --git a/tests/extensions/test_kingfisher_process_api2.py b/tests/extensions/test_kingfisher_process_api2.py index b997b3f5a..f56b3b0bb 100644 --- a/tests/extensions/test_kingfisher_process_api2.py +++ b/tests/extensions/test_kingfisher_process_api2.py @@ -12,7 +12,7 @@ from tests import ExpectedError, spider_with_crawler, spider_with_files_store rabbit_url = os.getenv('RABBIT_URL') -skip_test_if = not rabbit_url and not os.getenv('CI') +skip_test_if = not rabbit_url and (not os.getenv('CI') or os.getenv('CI_SKIP')) items_scraped = [ ('build_file', 'file.json', {