-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65a0fd2
commit 5b09a6e
Showing
8 changed files
with
94 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build & Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- feature* | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build and Test | ||
run: | | ||
./ci/build.sh |
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,13 @@ | ||
FROM python:3.10.7 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
RUN set -e; \ | ||
pip -q install --upgrade pip && \ | ||
pip -q install --no-cache-dir -r requirements.txt && \ | ||
pip check | ||
|
||
|
||
CMD ["sh", "run.sh"] |
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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
flake8 |
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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
python main.py |
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,46 @@ | ||
#!/usr/bin/env bash | ||
#shellcheck disable=SC2039 | ||
|
||
set -exuo pipefail | ||
|
||
IMAGE_PREFIX="eu.gcr.io/akvo-lumen/idh-idc" | ||
CI_COMMIT=$(git rev-parse --short "$GITHUB_SHA") | ||
|
||
echo "CI_COMMIT=${CI_COMMIT}" | ||
|
||
dc() { | ||
docker compose \ | ||
--ansi never \ | ||
"$@" | ||
} | ||
|
||
frontend_build() { | ||
|
||
echo "PUBLIC_URL=/" >frontend/.env | ||
|
||
# Code Quality and Build Folder | ||
sed 's/"warn"/"error"/g' <frontend/.eslintrc.json >frontend/.eslintrc.prod.json | ||
|
||
dc -f docker-compose.yml run \ | ||
--rm \ | ||
--no-deps \ | ||
frontend \ | ||
sh release.sh | ||
|
||
docker build \ | ||
--tag "${IMAGE_PREFIX}/frontend:latest" \ | ||
--tag "${IMAGE_PREFIX}/frontend:${CI_COMMIT}" frontend | ||
|
||
} | ||
|
||
backend_build() { | ||
|
||
docker build \ | ||
--tag "${IMAGE_PREFIX}/backend:latest" \ | ||
--tag "${IMAGE_PREFIX}/backend:${CI_COMMIT}" backend | ||
} | ||
|
||
backend_build | ||
frontend_build | ||
|
||
docker-compose -f docker-compose.test.yml run -T ./check.sh |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
#!/usr/bin/env bash | ||
#shellcheck disable=SC2039 | ||
|
||
set -euo pipefail | ||
|
||
yarn install --no-progress --frozen-lock | ||
yarn eslint --config .eslintrc.prod.json src --ext .js,.jsx | ||
yarn prettier --check src/ | ||
yarn test:ci | ||
yarn build |