Skip to content

Add missing localizations #642

Add missing localizations

Add missing localizations #642

Workflow file for this run

name: LIPAS CI
on: [push]
env:
AUTH_KEY: ${{ vars.AUTH_KEY }}
ADMIN_PASSWORD: ${{ vars.ADMIN_PASSWORD }}
SMTP_HOST: ${{ vars.SMTP_HOST }}
SMTP_USER: ${{ vars.SMTP_USER }}
SMTP_FROM: ${{ vars.SMTP_FROM }}
SMTP_PASS: ${{ vars.SMTP_PASS }}
SEARCH_HOST: ${{ vars.SEARCH_HOST }}
SEARCH_USER: ${{ vars.SEARCH_USER }}
SEARCH_PASS: ${{ vars.SEARCH_PASS}}
ES_JAVA_OPTS: ${{ vars.ES_JAVA_OPTS }}
DB_NAME: ${{ vars.DB_NAME }}
DB_HOST: ${{ vars.DB_HOST }}
DB_PORT: ${{ vars.DB_PORT }}
DB_SUPERUSER: ${{ vars.DB_SUPERUSER }}
DB_SUPERUSER_PASSWORD: ${{ vars.DB_SUPERUSER_PASSWORD }}
DB_USER: ${{ vars.DB_USER }}
DB_PASSWORD: ${{ vars.DB_PASSWORD }}
MML_AUTH: ${{ vars.MML_AUTH }}
OLD_LIPAS_URL: ${{ vars.OLD_LIPAS_URL }}
OLD_LIPAS_USER: ${{ vars.OLD_LIPAS_USER }}
OLD_LIPAS_PASS: ${{ vars.OLD_LIPAS_PASS }}
ACCESSIBILITY_REGISTER_BASE_URL: ${{ vars.ACCESSIBILITY_REGISTER_BASE_URL }}
ACCESSIBILITY_REGISTER_SYSTEM_ID: ${{ vars.ACCESSIBILITY_REGISTER_SYSTEM_ID }}
ACCESSIBILITY_REGISTER_SECRET_KEY: ${{ vars.ACCESSIBILITY_REGISTER_SECRET_KEY }}
LEGACY_DB_URL: ${{ vars.LEGACY_DB_URL }}
LEGACY_DB_USER: ${{ vars.LEGACY_DB_USER }}
LEGACY_DB_PASS: ${{ vars.LEGACY_DB_PASS }}
GEOSERVER_ADMIN_USER: ${{ vars.GEOSERVER_ADMIN_USER }}
GEOSERVER_ADMIN_PASSWORD: ${{ vars.GEOSERVER_ADMIN_PASSWORD }}
GEOSERVER_INITIAL_MEMORY: ${{ vars.GEOSERVER_INITIAL_MEMORY }}
GEOSERVER_MAX_MEMORY: ${{ vars.GEOSERVER_MAX_MEMORY}}
OSRM_CAR_URL: ${{ vars.OSRM_CAR_URL }}
OSRM_BICYCLE_URL: ${{ vars.OSRM_BICYCLE_URL }}
OSRM_FOOT_URL: ${{ vars.OSRM_FOOT_URL }}
MAILCHIMP_CAMPAIGN_FOLDER_ID: ${{ vars.MAILCHIMP_CAMPAIGN_FOLDER_ID }}
MAILCHIMP_LIST_ID: ${{ vars.MAILCHIMP_LIST_ID }}
MAILCHIMP_NEWSLETTER_INTEREST_ID: ${{ vars.MAILCHIMP_NEWSLETTER_INTEREST_ID }}
MAILCHIMP_API_URL: ${{ vars.MAILCHIMP_API_URL }}
MAILCHIMP_API_KEY: ${{ vars.MAILCHIMP_API_KEY }}
DIGITRANSIT_SUBSCRIPTION_KEY: ${{ vars.DIGITRANSIT_SUBSCRIPTION_KEY }}
MML_COVERAGE_URL: ${{ vars.MML_COVERAGE_URL }}
MML_API_KEY: ${{ vars.MML_API_KEY }}
AWS_ACCESS_KEY_ID: lol
AWS_SECRET_ACCESS_KEY: lol
AWS_REGION: 'eu-north-1'
AWS_S3_BUCKET: lol
AWS_S3_BUCKET_PREFIX: lol
LEIN_SILENT: true
UTP_CMS_API_URL: "https://luontoon-fi-cms-test.druid.fi/fi/jsonapi"
UTP_CMS_API_USER: lipas-developer
UTP_CMS_API_PASS: password
UTP_WEBHOOK_SOURCE_ENV: ${{ vars.UTP_WEBHOOK_SOURCE_ENV }}
UTP_WEBHOOK_URL: ${{ vars.UTP_WEBHOOK_URL }}
UTP_WEBHOOK_SUBSCRIPTION_KEY: ${{ vars.UTP_WEBHOOK_SUBSCRIPTION_KEY }}
UTP_WEBHOOK_TOKEN_CLIENT_ID: ${{ vars.UTP_WEBHOOK_TOKEN_CLIENT_ID }}
UTP_WEBHOOK_TOKEN_CLIENT_SECRET: ${{ vars.UTP_WEBHOOK_TOKEN_CLIENT_SECRET }}
UTP_WEBHOOK_TOKEN_URL: ${{ vars.UTP_WEBHOOK_TOKEN_URL }}
PTV_API_URL: "https://api.palvelutietovaranto.trn.suomi.fi/api"
PTV_TOKEN_URL: "https://palvelutietovaranto.trn.suomi.fi/api/auth/api-login"
PTV_SERVICE_URL: "https://api.palvelutietovaranto.trn.suomi.fi/api/v11/Service"
PTV_SERVICE_LOCATION_URL: "https://api.palvelutietovaranto.trn.suomi.fi/api/v11/ServiceChannel/ServiceLocation"
PTV_ORG_ID: "52e0f6dc-ec1f-48d5-a0a2-7a4d8b657d53"
PTV_API_USERNAME: ${{ vars.PTV_API_USERNAME }}
PTV_API_PASSWORD: ${{ vars.PTV_API_PASSWORD }}
OPEN_AI_API_KEY: ${{ vars.OPEN_AI_API_KEY }}
jobs:
utp-schema-gen:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@11.0
with:
lein: latest
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
# key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
key: cljdeps-${{ hashFiles('webapp/project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Check if there are changes
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
webapp/src/cljc/lipas/data/activities.cljc
- name: Generate JSON schema
if: steps.changed-files.outputs.any_changed == 'true'
run: lein run -m lipas.data.activities > utp-schema.json
working-directory: ./webapp
- name: Generate CSV
if: steps.changed-files.outputs.any_changed == 'true'
run: lein run -m lipas.data.activities csv > utp-schema.csv
working-directory: ./webapp
- name: Deploy JSON schema to Gist
if: steps.changed-files.outputs.any_changed == 'true'
uses: exuanbo/actions-deploy-gist@v1.1.4
with:
token: ${{ secrets.UTP_SCHEMA_GIST_TOKEN }}
gist_id: ace43a7f66f7b14c526baab0f29c91d9
file_path: webapp/utp-schema.json
file_type: text
- name: Deploy CSV to Gist
if: steps.changed-files.outputs.any_changed == 'true'
uses: exuanbo/actions-deploy-gist@v1.1.4
with:
token: ${{ secrets.UTP_SCHEMA_GIST_TOKEN }}
gist_id: 557991b8d68186e5ec4e88388a1c1741
file_path: webapp/utp-schema.csv
file_type: text
loi-schema-gen:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@11.0
with:
lein: latest
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
# key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
key: cljdeps-${{ hashFiles('webapp/project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Check if there are changes
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
webapp/src/cljc/lipas/data/loi.cljc
- name: Generate JSON schema
if: steps.changed-files.outputs.any_changed == 'true'
run: lein run -m lipas.data.loi > loi-schema.json
working-directory: ./webapp
- name: Generate CSV
if: steps.changed-files.outputs.any_changed == 'true'
run: lein run -m lipas.data.loi csv > loi-schema.csv
working-directory: ./webapp
- name: Deploy JSON schema to Gist
if: steps.changed-files.outputs.any_changed == 'true'
uses: exuanbo/actions-deploy-gist@v1.1.4
with:
token: ${{ secrets.UTP_SCHEMA_GIST_TOKEN }}
gist_id: d531983de8b935dcff838b1d5403a5f1
file_path: webapp/loi-schema.json
file_type: text
- name: Deploy CSV to Gist
if: steps.changed-files.outputs.any_changed == 'true'
uses: exuanbo/actions-deploy-gist@v1.1.4
with:
token: ${{ secrets.UTP_SCHEMA_GIST_TOKEN }}
gist_id: 1cf16b04329482559ea72815f894833a
file_path: webapp/loi-schema.csv
file_type: text
ci:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@11.0
with:
# cli: latest
lein: latest
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
# key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
key: cljdeps-${{ hashFiles('webapp/project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
cache-dependency-path: webapp/package-lock.json
# TODO: Drop docker compose in CI config
- name: Run backend tests
run: docker compose run --rm backend-tests
- name: Build backend jar
run: docker compose run --rm backend-build
- name: Build frontend
run: |
npm install --quiet
npx shadow-cljs release app
working-directory: ./webapp
# - name: Install npm dependencies
# run: docker compose run --rm frontend-npm-deps
# - name: Build frontend
# run: docker compose run --rm frontend-build
# - name: Run backend migrations
# run: docker compose run --rm backend-migrate
# - name: Seed backend data to db
# run: docker compose run --rm backend-seed
# - name: Index backend data to ES
# run: docker compose run --rm backend-index-search
# - name: Generate self-sigend SSL-certificate
# run: |
# openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
# -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
# -keyout certs/server.key -out certs/server.crt
# - name: Run integration tests
# run: docker compose run --rm integration-tests
- name: docker logs
if: ${{ failure() }}
run: docker compose logs