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

feat: Add screenshot test into CI and fix the health test for NZTM2000Quad. BM-1087 #422

Merged
merged 3 commits into from
Oct 9, 2024
Merged
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
52 changes: 52 additions & 0 deletions .github/workflows/screenshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: screenshot

on:
pull_request:
push:
branches:
- master

jobs:
screenshot:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: read
steps:
- uses: linz/action-typescript@v3

- name: (Screenshot) Screenshot Pull Request Changes
run: |
./bms.mjs --url https://basemaps.linz.govt.nz --output .artifacts/visual-snapshots

- name: Save snapshots
uses: getsentry/action-visual-snapshot@v2
with:
save-only: true
snapshot-path: .artifacts/visual-snapshots

visual-diff:
permissions:
id-token: write
contents: write
checks: write
needs: [screenshot]
name: validate screenshots
if: github.ref != 'refs/heads/master' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: AWS Configure
uses: aws-actions/[email protected]
with:
aws-region: ap-southeast-2
mask-aws-account-id: true
role-to-assume: ${{ secrets.AWS_ROLE_SCREENSHOT }}

- name: Diff snapshots
id: visual-snapshots-diff
uses: blacha/action-visual-snapshot@v2
with:
storage-prefix: 's3://linz-basemaps-screenshot'
storage-url: 'https://d25mfjh9syaxsr.cloudfront.net'
2 changes: 1 addition & 1 deletion src/tiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const DefaultTestTiles: TestTile[] = [
name: 'health-2193-z3',
tileMatrix: TileMatrixIdentifier.Nztm2000Quad,
location: { lat: -41.8899962, lng: 174.0492437, z: 3 },
tileSet: 'aerial',
tileSet: 'health',
},
{
name: 'aerial-3857-wellington-urban-z16',
Expand Down
Loading