Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
4b5b5c7
fix(actions): upgrade cache
johnsyweb Sep 9, 2025
1d55df3
feat(dependabot): keep dependencies up-to-date automatically
johnsyweb Sep 9, 2025
e3ced9f
doc(README): reflect current ci/cd config
johnsyweb Sep 9, 2025
9997843
Merge branch 'paj/keep-dependencies-updated'
johnsyweb Sep 9, 2025
1ba9d6e
chore(dev): add scripts-to-rule-them-all and wire CI to script/cibuild
johnsyweb Mar 4, 2026
84b674e
chore(ci): remove legacy travis configuration
johnsyweb Mar 4, 2026
5b949b3
chore(tooling): add mise for tool version management
johnsyweb Mar 4, 2026
0764d18
chore(docker): update to node 20
johnsyweb Mar 4, 2026
6057d9d
docs: add pnpm migration plan and link from README
johnsyweb Mar 4, 2026
b780061
chore(tooling): add pnpm workspace (migration step 1) and require mis…
johnsyweb Mar 4, 2026
84eaf29
chore: test for 1001388
johnsyweb Mar 4, 2026
aa14920
refactor(extension): restructure to extension/src and add manifest fr…
johnsyweb Mar 4, 2026
7a07f60
feat(extension): complete pnpm migration steps 3–4 – Node build in sc…
johnsyweb Mar 4, 2026
cb3405b
feat(tests): move unit tests into pnpm workspace (step 5)
johnsyweb Mar 4, 2026
5674f4a
feat(extension): source third-party JS from npm, keep patched CSS ven…
johnsyweb Mar 4, 2026
401ead3
fix(extension): fullscreen control and error handler logging
johnsyweb Mar 4, 2026
0258871
fix(extension): fullscreen control icon for leaflet.fullscreen\n\n- T…
johnsyweb Mar 4, 2026
98ca84f
refactor(extension): rely on leaflet.fullscreen CSS instead of custom…
johnsyweb Mar 4, 2026
903eedd
feat(dev): launch Chrome alongside Firefox via script/server\n\n- Sta…
johnsyweb Mar 4, 2026
53eaa07
test(extension): run UI tests from script/test and load Leaflet CSS/i…
johnsyweb Mar 4, 2026
abc27fa
test(extension): add Leaflet markers UI test with route mocking (no n…
johnsyweb Mar 4, 2026
7ac2ff5
refactor(extension): make Leaflet UI test network-free and faster
johnsyweb Mar 4, 2026
dd47f9f
chore(ui-test): run Playwright headless without devtools
johnsyweb Mar 4, 2026
4df5736
test(extension): make Basic extension load test network-free and fast
johnsyweb Mar 4, 2026
1f06599
test(extension): make No results for parkrunner test network-free and…
johnsyweb Mar 4, 2026
dc40ac3
test(extension): make all badge-awarded tests network-free and fast
johnsyweb Mar 4, 2026
6e25774
chore(ui-test): remove disused code and comments from extension.spec.js
johnsyweb Mar 5, 2026
59bc0bf
chore(ui-test): remove screenshot ephemera and ignore future screenshots
johnsyweb Mar 5, 2026
ca802b0
docs: document UI tests as guard for Leaflet-to-pnpm migration
johnsyweb Mar 5, 2026
ee768e7
Merge branch 'leaflet-markers-ui-test' into playwright-network-mocking
johnsyweb Mar 5, 2026
529276f
chore(ui-test): remove nginx and all references; tests use route mock…
johnsyweb Mar 5, 2026
8da5a85
build(ext): source leaflet-extramarkers CSS and images from npm
johnsyweb Mar 5, 2026
ad502da
fix(build): tolerate missing patches directory
johnsyweb Mar 5, 2026
be20aa5
feat(ui-test): add screenshot and HTML on failure, fix timeouts
johnsyweb Mar 5, 2026
d21a1b1
refactor(build): remove patches; document CI debug artefact uploads
johnsyweb Mar 5, 2026
9d48768
build(website): source jQuery from pnpm for website assets
johnsyweb Mar 5, 2026
104b4e6
build(website): source Leaflet JS, CSS and images from pnpm
johnsyweb Mar 5, 2026
2e0a9a0
build(website): source d3-voronoi from pnpm
johnsyweb Mar 5, 2026
3002d05
refactor(build): DRY website asset copying via copy-assets.sh
johnsyweb Mar 5, 2026
165685c
chore(build): remove commented-out code from website build scripts
johnsyweb Mar 5, 2026
cf767a1
build(website): source fullscreen, markercluster, extramarkers from pnpm
johnsyweb Mar 5, 2026
878d7c0
build: source leaflet-canvasicon from pnpm (v0.1.6)
johnsyweb Mar 5, 2026
e94aaea
chore: ignore package-lock.json (project uses pnpm)
johnsyweb Mar 5, 2026
9cad14f
build(deps): source leaflet-piechart from GitHub (sashakavun/leaflet-…
johnsyweb Mar 5, 2026
d20bbb1
docs: clarify Dependabot pnpm updates in README
johnsyweb Mar 5, 2026
32760f5
build(tooling): standardise JS tooling on pnpm 10
johnsyweb Mar 5, 2026
d006548
docs: remove completed pnpm migration plan
johnsyweb Mar 5, 2026
bc18b07
build(firefox): fix web-ext manifest errors and reduce third-party li…
johnsyweb Mar 5, 2026
00eaf6f
build: pin web-ext via pnpm exec for consistent lint behaviour
johnsyweb Mar 5, 2026
2ec368b
build: simplify tooling and drop gnu-sed requirement
johnsyweb Mar 5, 2026
59fd4b2
build(lint): filter web-ext data-collection and third-party innerHTML…
johnsyweb Mar 5, 2026
ffd8c48
build(lint): ignore third-party scripts during web-ext build
johnsyweb Mar 5, 2026
1ef1b6d
build(website): add script/server-website for local verification
johnsyweb Mar 5, 2026
736f072
build(website): drop docker for local Jekyll workflows
johnsyweb Mar 5, 2026
cec3808
build(website): add webrick for local Jekyll serve
johnsyweb Mar 5, 2026
c9b296b
feat(website): add favicon from existing logo
johnsyweb Mar 5, 2026
f396a3f
build(server): use pnpm exec web-ext via mise-managed toolchain
johnsyweb Mar 5, 2026
ac0121d
fix(server): use absolute source-dir for web-ext run
johnsyweb Mar 5, 2026
8d3c4e3
feat(extension): infer athlete id and home parkrun from page
johnsyweb Mar 5, 2026
9573c1c
test: tidy content-script test scaffolding comment
johnsyweb Mar 5, 2026
702faf1
feat(extension): derive home parkrun from results with recency tie-break
johnsyweb Mar 5, 2026
ccc27f4
test: cover calculateCountryCompletionInfo for piechart data
johnsyweb Mar 5, 2026
1737f2f
test(ui): assert explorer map renders country completion pie charts
johnsyweb Mar 5, 2026
ebbea1d
test(ui): use Danny Norman fixture for explorer piechart check
johnsyweb Mar 5, 2026
34b5268
test(ui): relax piechart assertion to rely on canvas only
johnsyweb Mar 5, 2026
4e58c8d
fix(extension): use patched leaflet-piechart commit
johnsyweb Mar 5, 2026
5f25250
fix(userscript): make explorer map and badges test pass
johnsyweb Mar 5, 2026
922452d
fix(userscript): render challenge map markers with ExtraMarkers CSS a…
johnsyweb Mar 6, 2026
76b5404
feat(userscript): add build, update script, install link and map layo…
johnsyweb Mar 6, 2026
941426c
chore(ruby): upgrade from 3.1 (EOL) to 3.2
johnsyweb Mar 6, 2026
1847a5a
chore(ruby): upgrade from 3.2 to 3.3
johnsyweb Mar 6, 2026
b54b631
chore(ruby): remove .ruby-version in favour of mise.toml
johnsyweb Mar 6, 2026
c682548
chore(ruby): upgrade from 3.3 to 3.4
johnsyweb Mar 6, 2026
1e48904
chore(ruby): upgrade Bundler to 2.6.1 and tidy Gemfile comments
johnsyweb Mar 6, 2026
a55d63b
chore(screenshots): update website screenshots
johnsyweb Mar 6, 2026
865caa7
feat(screenshots): add script to capture website screenshots with ext…
johnsyweb Mar 6, 2026
3fe7ff1
chore(screenshots): extension and site changes for screenshot capture
johnsyweb Mar 6, 2026
cdd2efd
chore(release): bump version to 2.0.1, userscript @version x.y.z for …
johnsyweb Mar 6, 2026
058e9e6
docs(website): add iOS userscript screengrab to v2.0.1 release post
johnsyweb Mar 6, 2026
3cde5e6
feat(website): add userscript manager links and Get Started instructions
johnsyweb Mar 6, 2026
4e46170
feat(website): allow local Jekyll server access from LAN (e.g. phone)
johnsyweb Mar 6, 2026
4e4f9c1
fix(ci): use HTTPS URL for leaflet-piechart so pnpm install works wit…
johnsyweb Mar 6, 2026
0555525
fix(ci): install pnpm deps before copy-assets in staging website work…
johnsyweb Mar 6, 2026
9dabcc2
fix(ci): run staging deploy only from fraz3alpha/running-challenges
johnsyweb Mar 6, 2026
d27dd7b
fix(ci): install Playwright browsers in Test the Javascript libraries…
johnsyweb Mar 6, 2026
5d932b5
chore(ruby): pin Bundler 2.6.9 and add mise bundle tasks
johnsyweb Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
76 changes: 76 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "UTC"
# Allow both major and minor updates for actions
open-pull-requests-limit: 10
# Group updates by action to reduce PR noise
groups:
github-actions:
patterns:
- "*"
# Auto-merge minor updates for trusted actions
commit-message:
prefix: "chore"
include: "scope"
# Reviewers for action updates
reviewers:
- "fraz3alpha"
# Labels for action updates
labels:
- "dependencies"
- "github-actions"
- "automated"

# Enable version updates for pnpm workspace (extension, tests, ui-test)
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "UTC"
open-pull-requests-limit: 10
groups:
pnpm-dependencies:
patterns:
- "*"
commit-message:
prefix: "chore"
include: "scope"
reviewers:
- "fraz3alpha"
labels:
- "dependencies"
- "pnpm"
- "automated"

# Enable version updates for Ruby/Bundler dependencies
- package-ecosystem: "bundler"
directory: "/website"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "UTC"
open-pull-requests-limit: 5
groups:
bundler-dependencies:
patterns:
- "*"
commit-message:
prefix: "chore"
include: "scope"
reviewers:
- "fraz3alpha"
labels:
- "dependencies"
- "ruby"
- "bundler"
- "automated"
135 changes: 61 additions & 74 deletions .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,74 @@ name: Extension Builder
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
branches:
- master
pull_request:

jobs:

test-javascript-libraries:
name: Test the Javascript libraries
runs-on: ubuntu-latest

defaults:
run:
shell: bash
working-directory: browser-extensions/common/js/tests

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v4

- name: Configure node v20
uses: actions/setup-node@v4
- name: Install toolchain with mise
uses: jdx/mise-action@v3
with:
node-version: '20'
install: true

- name: Install test framework dependencies
run: npm install
- name: Install pnpm dependencies
run: pnpm install --frozen-lockfile

- name: Install Playwright Browsers
run: pnpm --filter running-challenges-chrome-ui-testing exec playwright install --with-deps chromium

- name: Run tests
run: npm run test-with-coverage
- name: Run script/cibuild
run: ./script/cibuild
shell: bash

# Set the job key. The key is displayed as the job name
# when a job name is not provided
build-extension:
# Name the Job
name: Build the extension
# Set the type of machine to run on
runs-on: ubuntu-latest
strategy:
matrix:
browser: ["chrome", "firefox"]

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v4

- name: Configure node v20
uses: actions/setup-node@v4
- name: Install toolchain with mise
uses: jdx/mise-action@v3
with:
node-version: '20'
install: true

- name: Install web-ext tooling
run: npm install -g web-ext
- name: Install pnpm dependencies
run: pnpm install --frozen-lockfile

# Runs a script
- name: Build ${{ matrix.browser }} Extension
- name: Build extensions (Chrome and Firefox)
run: |
echo "Building extension for ${{ matrix.browser }} at `date`"
# Make the build script executable
chmod +x ./build/extension-${{ matrix.browser }}/build.sh
# Build the extension
./build/extension-${{ matrix.browser }}/build.sh
shell: bash
source build/version.sh
export EXTENSION_BUILD_VERSION EXTENSION_BUILD_ID
pnpm --filter running-challenges-extension run build:extension
env:
EXTENSION_BUILD_ID: ${{ github.run_number }}

- name: Upload build extension package
- name: Upload Chrome extension package
uses: actions/upload-artifact@v4
with:
name: chrome-extension-package
path: browser-extensions/chrome/build/web-ext-artifacts/running_challenges-chrome-*.zip

- name: Upload Firefox extension package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.browser }}-extension-package
path: browser-extensions/${{ matrix.browser }}/build/web-ext-artifacts/running_challenges-*.zip
name: firefox-extension-package
path: browser-extensions/firefox/build/web-ext-artifacts/running_challenges-firefox-*.zip

integration-test:
name: UI Testing
runs-on: ubuntu-latest
needs:
needs:
- build-extension
- test-javascript-libraries
strategy:
Expand Down Expand Up @@ -112,10 +103,9 @@ jobs:
defaults:
run:
shell: bash
working-directory: browser-extensions/common/js/tests/ui-test
working-directory: browser-extensions/extension/src/js/tests/ui-test

steps:

# Checks out a copy of the repository
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -124,54 +114,40 @@ jobs:
- name: Download all built extension packages
uses: actions/download-artifact@v4
with:
path: browser-extensions/common/js/tests/ui-test/extension-binaries
path: browser-extensions/extension/src/js/tests/ui-test/extension-binaries

- name: Show built extension packages
run: ls -lR extension-binaries

- name: Configure node v20
uses: actions/setup-node@v4
uses: jdx/mise-action@v3
with:
node-version: '20'
install: true

- name: Install Required OS packages
run: |
sudo apt-get update && \
sudo apt-get install -y xvfb unzip

- name: Start up the supporting nginx services
run: |

echo "Creating a certificate"
cd ./supporting-data/nginx/cert/
bash generate.sh
cd -

echo "Starting up docker compose services"
docker compose -f "./supporting-data/docker-compose-gh-actions.yml" up --force-recreate -d

# Give nginx a moment to have fully come up
sleep 1

# Make the changes to /etc/hosts so that the tests reference the above containers.
echo "Append to /etc/hosts to use this nginx"
sudo bash -c 'cat ./supporting-data/etc-hosts.txt >> /etc/hosts'

- name: Unpack extension
run: |
ls -lR extension-binaries
cd extension-binaries/chrome-extension-package
unzip *.zip

- name: Install Node dependencies
run: npm ci
- name: Install pnpm dependencies
working-directory: ${{ github.workspace }}
run: pnpm install --frozen-lockfile

- name: Install Playwright Browsers
run: |
npx playwright install --with-deps chromium
working-directory: ${{ github.workspace }}
run: pnpm --filter running-challenges-chrome-ui-testing exec playwright install --with-deps chromium

# Full suite includes "Leaflet markers load with icons", which guards against
# regressions when moving Leaflet (or other third-party assets) to pnpm.
- name: Run Playwright tests
run: xvfb-run npx playwright test
working-directory: ${{ github.workspace }}
run: xvfb-run pnpm --filter running-challenges-chrome-ui-testing run test
env:
COUNTRY_HOSTNAME: "${{ matrix.country_hostname }}"

Expand All @@ -182,19 +158,32 @@ jobs:
if: always()
with:
name: ui-tests-chrome-${{ matrix.country_hostname }}
path: |
browser-extensions/common/js/tests/ui-test/playwright-report/
browser-extensions/common/js/tests/ui-test/screenshot.png
path: browser-extensions/extension/src/js/tests/ui-test/playwright-report/
retention-days: 30

# Debug artefacts for inspecting UI test failures (screenshots + page HTML)
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ui-tests-screenshots-${{ matrix.country_hostname }}
path: browser-extensions/extension/src/js/tests/ui-test/test-results/
retention-days: 7

- uses: actions/upload-artifact@v4
if: failure()
with:
name: ui-tests-html-${{ matrix.country_hostname }}
path: browser-extensions/extension/src/js/tests/ui-test/playwright-debug/
retention-days: 7

# This stage will run once the extensions have been built, and should only run if they were successful.
# Assuming they are successful, we will push them somewhere they can be used.

# If we are on the master branch, and it is tagged as a release versino, we should create a release
publish-extension:
name: Push the build extensions somewhere
runs-on: ubuntu-latest
needs:
needs:
- integration-test
# if: startsWith(github.ref, 'refs/tags/v')

Expand Down Expand Up @@ -246,7 +235,6 @@ jobs:
})
*/
# if: startsWith(github.ref, 'refs/tags/v')


# - id: get-branch-version-tag
# uses: actions/github-script@v7
Expand All @@ -258,7 +246,6 @@ jobs:
# }
# core.setOutput('version_tag', version_tag)
# if: startsWith(github.ref, 'refs/tags/v')

- run: echo "branch version tag is ${{steps.get-branch-version-tag.outputs.version_tag}}"
# if: startsWith(github.ref, 'refs/tags/v')

Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/build-staging-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Staging Website Builder
concurrency: staging-website-build

# Run this workflow every time a new commit is pushed to any branch apart from the production one (master)
on:
on:
push:
branches-ignore:
- master
Expand All @@ -28,10 +28,10 @@ jobs:
- name: 📂 Checkout code
uses: actions/checkout@v4

- name: 💎 setup ruby
uses: ruby/setup-ruby@v1
- name: 💎 setup ruby with mise
uses: jdx/mise-action@v3
with:
ruby-version: 3.1
install: true

- name: Sanitise branch name
shell: bash
Expand All @@ -41,6 +41,9 @@ jobs:
echo "sanitised branch name: ${SANITISED_BRANCH_NAME}"
echo "sanitised-branch-name=${SANITISED_BRANCH_NAME}" >> $GITHUB_OUTPUT

- name: Install pnpm dependencies
run: pnpm install --frozen-lockfile

# Prepare the website directory
- name: Copy dependencies to Website directory
run: |
Expand Down Expand Up @@ -71,11 +74,12 @@ jobs:

# Then we need to prune any directories that don't match to currently active branches

# Deploy steps only run on the canonical repo; forks build but do not deploy (no token).
# Get the latest copy of the repo
# We need to set a token here, otherwise it uses the default one that won't have permission to push
- name: Checkout code
uses: actions/checkout@v4
if: ${{ github.actor != 'dependabot[bot]' }}
if: github.repository == 'fraz3alpha/running-challenges' && github.actor != 'dependabot[bot]'
with:
repository: fraz3alpha/running-challenges-staging
ref: gh-pages
Expand All @@ -84,7 +88,7 @@ jobs:

- name: Reconcile branches
id: reconcile-branches
if: ${{ github.actor != 'dependabot[bot]' }}
if: github.repository == 'fraz3alpha/running-challenges' && github.actor != 'dependabot[bot]'
run: |
git ls-remote --heads | awk '{print $2}' | awk -F 'refs/heads/' '{print $2}' | sort > running-challenges-branches.txt
echo "All branches: $(cat running-challenges-branches.txt)"
Expand Down Expand Up @@ -124,7 +128,7 @@ jobs:

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.actor != 'dependabot[bot]' }}
if: github.repository == 'fraz3alpha/running-challenges' && github.actor != 'dependabot[bot]'
with:
personal_token: ${{ secrets.RUNNING_CHALLENGES_STAGING_GITHUB_API_TOKEN }}
external_repository: fraz3alpha/running-challenges-staging
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
submodules: recursive

# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
Expand Down
Loading
Loading