Skip to content

Commit

Permalink
fix github action workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sammyfung committed Aug 31, 2023
1 parent 42e7e42 commit 1b527dd
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/hk0weather.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ on:
jobs:
hk0weather-tests:
runs-on: ubuntu-latest
env:
PYTHON: '3.9'
steps:
- uses: actions/checkout@master
- name: Setup python
uses: actions/setup-python@master
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.10
- name: Install required python packages
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 coverage
Expand All @@ -30,18 +28,18 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: List available scrapers
run: |
coverage run -m scrapy list
coverage run -a -m scrapy list
- name: Test a scraper of regional weather
run: |
coverage run -m scrapy crawl regional -o regional.csv
coverage run -a -m scrapy crawl regional -o regional.csv
working-directory: hk0weather
- name: Test a scraper of daily weather forecast
run: |
coverage run -m scrapy crawl hkoforecast -o hkoforecast.csv
coverage run -a -m scrapy crawl hkoforecast -o hkoforecast.csv
working-directory: hk0weather
- name: Test a scraper of 9-day weather forecast
run: |
coverage run -m scrapy crawl hko9dayforecast -o hko9dayforecast.csv
coverage run -a -m scrapy crawl hko9dayforecast -o hko9dayforecast.csv
working-directory: hk0weather
- name: Generate coverage json report
run: |
Expand Down

0 comments on commit 1b527dd

Please sign in to comment.