diff --git a/.github/workflows/hk0weather.yml b/.github/workflows/hk0weather.yml index a6ed446..c1955f8 100644 --- a/.github/workflows/hk0weather.yml +++ b/.github/workflows/hk0weather.yml @@ -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 @@ -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: |