|
1 | 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
2 | 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
3 | 3 |
|
4 | | -name: Continuous Integration |
| 4 | +name: CI |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | push: |
8 | 8 | branches: [ main ] |
9 | 9 | pull_request: |
10 | 10 | branches: [ main ] |
| 11 | + # Allows you to run this workflow manually from the Actions tab |
| 12 | + workflow_dispatch: |
11 | 13 |
|
12 | 14 | jobs: |
13 | | - build: |
| 15 | + common: |
| 16 | + uses: City-of-Helsinki/.github/.github/workflows/ci-node.yml@main |
| 17 | + secrets: inherit |
| 18 | + with: |
| 19 | + node-version: 22.x |
| 20 | + extra-commands: | |
| 21 | + echo "PORT=2048" >> $GITHUB_ENV |
| 22 | + echo "SSR_FETCH_TIMEOUT=2500" >> $GITHUB_ENV |
| 23 | + echo "ACCESSIBILITY_SENTENCE_API=https://www.hel.fi/palvelukarttaws/rest/v4" >> $GITHUB_ENV |
| 24 | + echo "SERVICEMAP_API=https://api.hel.fi/servicemap/" >> $GITHUB_ENV |
| 25 | + echo "SERVICEMAP_API_VERSION=v2" >> $GITHUB_ENV |
| 26 | + echo "EVENTS_API=https://api.hel.fi/linkedevents/v1" >> $GITHUB_ENV |
| 27 | + echo "RESERVATIONS_API=https://varaamo.hel.fi" >> $GITHUB_ENV |
| 28 | + echo "PRODUCTION_PREFIX=SM" >> $GITHUB_ENV |
| 29 | + echo "DIGITRANSIT_API=https://digitransit-proxy.api.hel.fi/routing/v1/routers/hsl/index/graphql" >> $GITHUB_ENV |
| 30 | + echo "FEEDBACK_URL=https://api.hel.fi/servicemap/open311/" >> $GITHUB_ENV |
| 31 | + echo "HEARING_MAP_API=https://kuulokuvat.fi/api/v1/servicemap-url" >> $GITHUB_ENV |
| 32 | + echo "MODE=production" >> $GITHUB_ENV |
| 33 | + echo "CITIES=helsinki,espoo,vantaa,kauniainen,kirkkonummi" >> $GITHUB_ENV |
| 34 | + echo "ORGANIZATIONS=[{ \"id\": \"83e74666-0836-4c1d-948a-4b34a8b90301\", \"name\": { \"fi\": \"Helsingin kaupunki\", \"sv\": \"Helsingfors stad\", \"en\": \"City of Helsinki\" } },{ \"id\": \"520a4492-cb78-498b-9c82-86504de88dce\", \"name\": { \"fi\": \"Espoon kaupunki\", \"sv\": \"Esbo stad\", \"en\": \"City of Espoo\" } },{ \"id\": \"6d78f89c-9fd7-41d9-84e0-4b78c0fa25ce\", \"name\": { \"fi\": \"Vantaan kaupunki\", \"sv\": \"Vanda stad\", \"en\": \"City of Vantaa\" } },{ \"id\": \"6f0458d4-42a3-434a-b9be-20c19fcfa5c3\", \"name\": { \"fi\": \"Kauniaisten kaupunki\", \"sv\": \"Grankulla stad\", \"en\": \"Town of Kauniainen\" } },{ \"id\": \"015fd5cd-b280-4d24-a5b4-0ba6ecb4c8a4\", \"name\": { \"fi\": \"Kirkkonummi\", \"sv\": \"Kyrkslätt\", \"en\": \"Kirkkonummi\" } },{ \"id\": \"0c8e4f99-3d52-47b9-84df-395716bd8b11\", \"name\": { \"fi\": \"Länsi-Uudenmaan hyvinvointialue\", \"sv\": \"Västra Nylands välfärdsområde\", \"en\": \"Western Uusimaa Wellbeing Services County\" } },{ \"id\": \"5de91045-92ab-484b-9f96-7010ff7fb35e\", \"name\": { \"fi\": \"Vantaan ja Keravan hyvinvointialue\", \"sv\": \"Vanda och Kervo välfärdsområde\", \"en\": \"Wellbeing services county of Vantaa and Kerava\" } }]" >> $GITHUB_ENV |
| 35 | + echo "SERVICE_MAP_URL=https://helsinki-maptiles.dev.hel.ninja/styles/hel-osm-bright-{language}/{z}/{x}/{y}{suffix}.png" >> $GITHUB_ENV |
| 36 | + echo "ACCESSIBLE_MAP_URL=https://helsinki-maptiles.dev.hel.ninja/styles/turku-osm-high-contrast-pattern-{language}/{z}/{x}/{y}{suffix}.png" >> $GITHUB_ENV |
| 37 | + echo "ORTOGRAPHIC_MAP_URL=https://kartta.hsy.fi/geoserver/gwc/service/wmts?layer=taustakartat_ja_aluejaot:Ortoilmakuva_2019&tilematrixset=ETRS-GK25&Service=WMTS&Request=GetTile&Version=1.0.0&TileMatrix=ETRS-GK25:{z}&TileCol={x}&TileRow={y}&Format=image/png" >> $GITHUB_ENV |
| 38 | + echo "ORTOGRAPHIC_WMS_URL=https://kartta.hsy.fi/geoserver/wms" >> $GITHUB_ENV |
| 39 | + echo "ORTOGRAPHIC_WMS_LAYER=taustakartat_ja_aluejaot:Ortoilmakuva_2019" >> $GITHUB_ENV |
| 40 | + echo "GUIDE_MAP_URL=https://kartta.hel.fi/ws/geoserver/avoindata/gwc/service/wmts?layer=avoindata:Karttasarja_PKS&tilematrixset=ETRS-GK25&Service=WMTS&Request=GetTile&Version=1.0.0&TileMatrix=ETRS-GK25:{z}&TileCol={x}&TileRow={y}&Format=image/png" >> $GITHUB_ENV |
| 41 | + echo "PLAIN_MAP_URL=https://mml-tiles.hel.ninja/avoin/wmts/1.0.0/selkokartta/default/ETRS-TM35FIN/{z}/{y}/{x}.png" >> $GITHUB_ENV |
| 42 | + echo "READ_FEEDBACK_URLS_HELSINKI=https://palautteet.hel.fi/fi/hae-palautteita#/app/search?r=12&text=,https://palautteet.hel.fi/sv/hae-palautteita#/app/search?r=12&text=,https://palautteet.hel.fi/en/hae-palautteita#/app/search?r=12&text=" >> $GITHUB_ENV |
| 43 | + echo "ADDITIONAL_FEEDBACK_URLS_ESPOO=https://easiointi.espoo.fi/eFeedback/fi,https://easiointi.espoo.fi/eFeedback/sv,https://easiointi.espoo.fi/eFeedback/en" >> $GITHUB_ENV |
| 44 | + echo "ADDITIONAL_FEEDBACK_URLS_KAUNIAINEN=https://www.kauniainen.fi/kaupunki-ja-paatoksenteko/osallistu-ja-vaikuta/,https://www.kauniainen.fi/sv/staden-och-beslutsfattande/delta-och-paverka/,https://www.kauniainen.fi/kaupunki-ja-paatoksenteko/osallistu-ja-vaikuta/" >> $GITHUB_ENV |
| 45 | + echo "ADDITIONAL_FEEDBACK_URLS_KIRKKONUMMI=https://kirkkonummi.fi/anna-palautetta-ja-vaikuta/,https://kyrkslatt.fi/ge-respons-och-paverka/,https://kirkkonummi.fi/anna-palautetta-ja-vaikuta/" >> $GITHUB_ENV |
| 46 | + echo "ADDITIONAL_FEEDBACK_URLS_VANTAA=https://www.vantaa.fi/fi/palaute,https://www.vantaa.fi/sv/feedback,https://www.vantaa.fi/en/feedback" >> $GITHUB_ENV |
| 47 | + echo "SLOW_FETCH_MESSAGE_TIMEOUT=3000" >> $GITHUB_ENV |
| 48 | + echo "HELSINKI_MAPTILES_ENABLED=true" >> $GITHUB_ENV |
14 | 49 |
|
| 50 | + e2e: |
| 51 | + needs: common |
15 | 52 | runs-on: ubuntu-latest |
16 | 53 |
|
17 | 54 | env: |
@@ -44,21 +81,17 @@ jobs: |
44 | 81 | SLOW_FETCH_MESSAGE_TIMEOUT: 3000 |
45 | 82 | HELSINKI_MAPTILES_ENABLED: true |
46 | 83 |
|
47 | | - strategy: |
48 | | - matrix: |
49 | | - node-version: [22.x] |
50 | | - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
51 | | - |
52 | 84 | steps: |
53 | | - - uses: actions/checkout@v4 |
54 | | - with: |
55 | | - fetch-depth: 0 |
56 | | - - name: Use Node.js ${{ matrix.node-version }} |
57 | | - uses: actions/setup-node@v4 |
58 | | - with: |
59 | | - node-version: ${{ matrix.node-version }} |
60 | | - - run: yarn install --frozen-lockfile |
61 | | - - run: yarn testBuild |
62 | | - - run: yarn test |
63 | | - - run: yarn test:e2e:install |
64 | | - - run: yarn test:e2e |
| 85 | + - uses: actions/checkout@v4 |
| 86 | + - name: Use Node.js 22.x |
| 87 | + uses: actions/setup-node@v4 |
| 88 | + with: |
| 89 | + node-version: 22.x |
| 90 | + - name: Install dependencies |
| 91 | + run: yarn install --frozen-lockfile |
| 92 | + - name: Build application |
| 93 | + run: yarn build |
| 94 | + - name: Install Playwright browsers |
| 95 | + run: yarn test:e2e:install |
| 96 | + - name: Run E2E tests |
| 97 | + run: yarn test:e2e |
0 commit comments