-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature_project_setup' into TAN-417-allow-open-ended-ph…
…ases
- Loading branch information
Showing
386 changed files
with
83,894 additions
and
5,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: CI | ||
on: | ||
push: | ||
paths: ['cl2-component-library/src/**']# Trigger the action only when files change in the folders defined here | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Begin CI... | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.0 | ||
|
||
- name: Use cached node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: cl2-component-library/node_modules | ||
key: nodeModules-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
nodeModules- | ||
- name: Install dependencies | ||
run: cd cl2-component-library && npm ci | ||
env: | ||
CI: true | ||
|
||
- name: Lint | ||
run: cd cl2-component-library && npm run lint | ||
env: | ||
CI: true | ||
|
||
- name: Test | ||
run: cd cl2-component-library && npm run test --ci --coverage --maxWorkers=2 | ||
env: | ||
CI: true | ||
|
||
- name: Build | ||
run: cd cl2-component-library && npm run build | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and Deploy Storybook | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: ['cl2-component-library/src/**'] # Trigger the action only when files change in the folders defined here | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Use Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.15.0 | ||
|
||
- name: Install and Build 🔧 | ||
run: | # Install npm packages and build the Storybook files | ||
cd cl2-component-library | ||
npm ci | ||
npm run build-storybook | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GB_TOKEN }} | ||
# Test branch | ||
BRANCH: cl2-component-library-storybook # The branch the action should deploy to. | ||
FOLDER: cl2-component-library/docs-build # The folder that the build-storybook script generates files. | ||
CLEAN: true # Automatically remove deleted files from the deploy branch | ||
TARGET_FOLDER: docs # The folder that we serve our Storybook files from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,36 @@ | ||
FROM ruby:2.7.6-slim | ||
|
||
RUN apt-get update && apt-get install -qq -y --no-install-recommends \ | ||
build-essential libpq-dev file imagemagick curl git optipng jpegoptim pngquant libgeos-dev libgmp3-dev netcat shared-mime-info \ | ||
less clang | ||
build-essential \ | ||
libpq-dev \ | ||
file \ | ||
imagemagick \ | ||
curl \ | ||
git \ | ||
optipng \ | ||
jpegoptim \ | ||
pngquant \ | ||
libgeos-dev \ | ||
libgmp3-dev \ | ||
netcat \ | ||
shared-mime-info \ | ||
less \ | ||
clang | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash - | ||
RUN apt-get -y install nodejs | ||
|
||
# Install MJML parser required by email engine. | ||
RUN npm install -g [email protected] | ||
|
||
# Install Postgres client: | ||
# Import the PostgreSQL repository signing key, add the repository, and install the package. | ||
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --yes --dearmor -o /usr/share/keyrings/postgresql-archive-keyring.gpg \ | ||
&& echo "deb [signed-by=/usr/share/keyrings/postgresql-archive-keyring.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ | ||
# Make sure the version of `postgresql-client` matches the version used by the | ||
# `postgres` service in `docker-compose.yml`. | ||
&& apt-get update && apt-get install -y postgresql-client-12 | ||
|
||
ENV INSTALL_PATH /cl2_back | ||
RUN mkdir -p $INSTALL_PATH | ||
WORKDIR $INSTALL_PATH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
class WebApi::V1::LocationController < ApplicationController | ||
skip_before_action :authenticate_user | ||
skip_after_action :verify_authorized | ||
|
||
def autocomplete | ||
render json: raw_json(Location::Service.new.autocomplete(params[:input], params[:language])) | ||
end | ||
|
||
def geocode | ||
render json: raw_json(Location::Service.new.geocode(params[:address], params[:language])) | ||
end | ||
|
||
def reverse_geocode | ||
render json: raw_json(Location::Service.new.reverse_geocode(params[:lat], params[:lng], params[:language])) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.