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

fix: Update AberdeenCityCouncil.py #1092

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 18 additions & 76 deletions .github/workflows/behave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,119 +164,61 @@ jobs:
steps:
- uses: actions/checkout@v4

# Fetch existing gh-pages to preserve history if on master branch and it's a push or schedule
- name: Get Existing History
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
# Fetch Allure history only for the full report
- name: Get Allure history - Full Report
if: github.event_name == 'schedule' || github.event_name == 'push'
uses: actions/checkout@v4
continue-on-error: true
with:
ref: gh-pages
path: allure-history
continue-on-error: true

# If PR doesn't need existing history, we can skip fetching. If you do want partial history across PRs,
# you could add another condition for pull_request here.
path: gh-pages/allure-full-history

# Generate Full Run Allure Reports (push/schedule on master)
# Generate Allure Reports (Full)
- name: Allure report action for Full Run
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
uses: simple-elf/allure-report-action@master
with:
allure_results: build/${{ matrix.python-version }}/allure-results
subfolder: ${{ matrix.python-version }}
allure_history: allure-history/full
keep_reports: 20

# Generate Partial Run Allure Reports (pull_request)
- name: Allure report action for Partial Run
if: github.event_name == 'pull_request'
uses: simple-elf/allure-report-action@master
if: github.event_name == 'schedule' || github.event_name == 'push'
with:
allure_results: build/${{ matrix.python-version }}/allure-results
subfolder: ${{ matrix.python-version }}
allure_history: allure-history/partial
allure_history: gh-pages/allure-full-history
keep_reports: 20

# Archive Full Reports
# Archive the Full Report
- name: Tar full report
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
run: tar -cvf allure_full_history_${{ matrix.python-version }}.tar allure-history/full/${{ matrix.python-version }}
if: github.event_name == 'schedule' || github.event_name == 'push'
run: tar -cvf allure_full_history_${{ matrix.python-version }}.tar gh-pages/allure-full-history/${{ matrix.python-version }}

# Archive Partial Reports
- name: Tar partial report
if: github.event_name == 'pull_request'
run: tar -cvf allure_partial_history_${{ matrix.python-version }}.tar allure-history/partial/${{ matrix.python-version }}

# Upload artifacts
# Upload the Full Report artifact
- name: Upload artifact for Full Report
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
if: github.event_name == 'schedule' || github.event_name == 'push'
with:
name: allure_full_history_${{ matrix.python-version }}
path: allure_full_history_${{ matrix.python-version }}.tar

- name: Upload artifact for Partial Report
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: allure_partial_history_${{ matrix.python-version }}
path: allure_partial_history_${{ matrix.python-version }}.tar

deploy:
name: Deploy Reports
runs-on: ubuntu-latest
needs: report
if: github.ref == 'refs/heads/master'
steps:
# Download Full Artifacts (push/schedule)
# Download Full Artifacts
- uses: actions/download-artifact@v4
name: Download Full Artifacts
if: github.event_name == 'push' || github.event_name == 'schedule'
with:
name: allure_full_history_3.12
path: allure-history/tars/full

# Download Partial Artifacts (pull_request)
- uses: actions/download-artifact@v4
name: Download Partial Artifacts
if: github.event_name == 'pull_request'
with:
name: allure_partial_history_3.12
path: allure-history/tars/partial

# Create directories if needed
- name: Create Full / Partial dirs
run: |
mkdir -p allure-history/full allure-history/partial

# Untar Full Reports
- name: Untar Full Reports
if: github.event_name == 'push' || github.event_name == 'schedule'
run: |
shopt -s nullglob
for i in allure-history/tars/full/*.tar; do tar -xvf "$i" -C allure-history/full; done

# Untar Partial Reports
- name: Untar Partial Reports
if: github.event_name == 'pull_request'
run: |
shopt -s nullglob
for i in allure-history/tars/partial/*.tar; do tar -xvf "$i" -C allure-history/partial; done
run: for i in allure-history/tars/full/*.tar; do tar -xvf "$i" -C allure-history/full; done

# Remove Tar Reports
- name: Remove Tar Reports
run: rm -rf allure-history/tars

# Ensure not empty
- name: Ensure not empty
run: |
if [ ! "$(ls -A allure-history)" ]; then
touch allure-history/.placeholder
fi

# Deploy everything to gh-pages
- name: Deploy
# Deploy the Full Report to GH Pages
- name: Deploy Full Report
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
publish_dir: allure-history/full
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from uk_bin_collection.uk_bin_collection.common import *
from uk_bin_collection.uk_bin_collection.get_bin_data import AbstractGetBinDataClass


# import the wonderful Beautiful Soup and the URL grabber
class CouncilClass(AbstractGetBinDataClass):
"""
Expand Down
Loading