Skip to content

Add wildcard to langauge index mapping #2146

Add wildcard to langauge index mapping

Add wildcard to langauge index mapping #2146

Workflow file for this run

# Copyright (C) 2021-2023 Technology Matters
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.
name: Lint and Test HRM
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Packages
run: npm ci
- name: Run Lint
run: npm run lint
build-lambda-containers:
runs-on: ubuntu-latest
strategy:
matrix:
lambda_name:
- contact-retrieve-transcript
- job-complete
- resources-import-consumer
- resources-import-producer
- resources-search-index
steps:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build Lambda Docker Images
uses: docker/build-push-action@v4
with:
context: ./
file: ./jobs/Dockerfile
build-args: |
lambda_name=${{ matrix.lambda_name }}
lambda_dir=${{ (startsWith(matrix.lambda_name, 'job') && 'jobs') || (startsWith(matrix.lambda_name, 'resources') && 'resources-domain') || 'hrm-domain' }}
push: false
tags: ${{ matrix.lambda_name }}-ci-test
build-service-container:
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build Service Docker Image
uses: docker/build-push-action@v2
with:
context: ./
file: ./hrm-domain/hrm-service/Dockerfile
push: false
tags: hrm-service-ci-test
test:
runs-on: ubuntu-latest
steps:
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.7.0
security-enabled: false
- name: Checkout Branch
uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Packages
run: npm ci
- name: Build
run: npm run build
- name: Run Unit Tests
run: npm run test:unit
- name: Setup database tables
uses: m4nu56/[email protected]
with:
# Version of PostgreSQL to use
postgresql version: 12.7
# POSTGRES_DB - name for the default database that is created
postgresql db: hrmdb
# POSTGRES_USER - create the specified user with superuser power
postgresql user: rdsadmin
# POSTGRES_PASSWORD - superuser password
postgresql password: postgres
# POSTGRES_INIT_SCRIPTS - directory containing DB init scripts
postgresql init scripts: test-support/db-init
- name: Run Service Tests
run: npm run test:service:ci