-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix dependencies and the login (#202)
- Loading branch information
Showing
12 changed files
with
238 additions
and
57 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -67,8 +67,28 @@ env: | |
SUPERSET_DB_DATABASE: postgres | ||
|
||
jobs: | ||
main: | ||
check-branch: | ||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 2 | ||
concurrency: | ||
group: ci-check-branch-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check if the PR's branch is updated | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: osl-incubator/[email protected] | ||
with: | ||
remote_branch: origin/main | ||
pr_sha: ${{ github.event.pull_request.head.sha }} | ||
|
||
main: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 55 | ||
defaults: | ||
|
@@ -79,7 +99,7 @@ jobs: | |
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create environment variables file | ||
run: | | ||
|
@@ -90,39 +110,37 @@ jobs: | |
envsubst < .env.tpl > .env | ||
mkdir /home/runner/work/psql_data | ||
- name: setup | ||
run: | | ||
make prepare-host | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniconda-version: "latest" | ||
mamba-version: "*" | ||
environment-file: conda/base.yaml | ||
channels: conda-forge,r,nodefaults | ||
activate-environment: epigraphhub | ||
use-mamba: true | ||
miniforge-variant: Mambaforge | ||
auto-update-conda: true | ||
conda-solver: libmamba | ||
|
||
- name: setup | ||
run: makim host.prepare | ||
|
||
- name: configure epigraphhub credentials | ||
run: | | ||
epigraphhub-config --name ci-epigraphhub \ | ||
--db-uri "${POSTGRES_EPIGRAPH_USER}:${POSTGRES_EPIGRAPH_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_EPIGRAPH_DB}" | ||
- name: configure aws s3 credentials to minio | ||
run: make dev-create-s3-credential | ||
run: makim aws.create-s3-credential | ||
|
||
- name: build docker containers | ||
run: make containers-build | ||
run: sugar build | ||
|
||
- name: start services | ||
run: | | ||
make containers-start-services SERVICES="superset airflow postgres" | ||
sugar ext restart --options -d | ||
- name: wait for the services are properly working | ||
run: | | ||
docker ps | ||
make containers-wait-all | ||
sugar ps | ||
makim containers.wait-all | ||
- name: run epigraphhub tests | ||
run: | | ||
|
@@ -146,7 +164,7 @@ jobs: | |
- name: Generate logs | ||
if: ${{ failure() }} | ||
run: | | ||
make containers-logs ARGS="--tail 1000" SERVICES="" > /tmp/containers-services.log | ||
sugar logs --options --tail 1000 > /tmp/containers-services.log | ||
- name: Archive log artifacts | ||
uses: actions/upload-artifact@v3 | ||
|
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,126 @@ | ||
version: 1.0 | ||
env-file: .env | ||
shell: bash | ||
|
||
groups: | ||
host: | ||
tasks: | ||
prepare: | ||
help: Prepare host environment | ||
run: bash scripts/prepare-host.sh | ||
|
||
containers: | ||
tasks: | ||
pull: | ||
help: Pull container images | ||
run: | | ||
set -e | ||
docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml pull ${SERVICES} | ||
build: | ||
help: Build containers | ||
run: | | ||
set -e | ||
docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml build ${SERVICES} | ||
start: | ||
help: Start containers | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml up --remove-orphans -d ${SERVICES} | ||
|
||
stop: | ||
help: Stop containers | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml stop ${ARGS} ${SERVICES} | ||
|
||
remove: | ||
help: Remove containers | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml rm ${ARGS} ${SERVICES} | ||
|
||
restart: | ||
help: Restart containers | ||
dependencies: | ||
- task: containers.stop | ||
- task: containers.start | ||
|
||
logs: | ||
help: Show container logs | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml logs ${ARGS} ${SERVICES} | ||
|
||
logs-follow: | ||
help: Follow container logs | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml logs --follow ${ARGS} ${SERVICES} | ||
|
||
exec: | ||
help: Execute command in a running container | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml exec ${ARGS} ${SERVICE} ${CMD} | ||
|
||
console: | ||
help: Open console in a container | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml exec ${ARGS} ${SERVICE} bash | ||
|
||
down: | ||
help: Take down containers and volumes | ||
run: docker-compose --env-file=.env --project-name egh-${ENV} --file containers/compose-base.yaml --file containers/compose-${ENV}.yaml down --volumes --remove-orphans | ||
|
||
reset-storage: | ||
help: Reset container storage | ||
run: rm -rf ~/.local/share/containers/ | ||
|
||
wait: | ||
help: Wait until container is healthy | ||
args: | ||
service: | ||
help: the name of the service | ||
type: str | ||
required: true | ||
timeout: | ||
help: the time (in seconds) for waiting the service | ||
type: int | ||
default: 90 | ||
required: false | ||
run: | | ||
timeout ${{ args.timeout }} ./containers/healthcheck.sh ${{ args.service }} | ||
wait-all: | ||
help: Wait until container is healthy | ||
args: | ||
timeout: | ||
help: the time (in seconds) for waiting the service | ||
type: int | ||
default: 90 | ||
required: false | ||
dependencies: | ||
- task: containers.wait | ||
args: | ||
timeout: ${{ args.timeout }} | ||
service: postgres | ||
- task: containers.wait | ||
args: | ||
timeout: ${{ args.timeout }} | ||
service: minio | ||
- task: containers.wait | ||
args: | ||
timeout: ${{ args.timeout }} | ||
service: redis | ||
- task: containers.wait | ||
args: | ||
timeout: ${{ args.timeout }} | ||
service: flower | ||
- task: containers.wait | ||
args: | ||
timeout: ${{ args.timeout }} | ||
service: superset | ||
|
||
aws: | ||
tasks: | ||
create-s3-credential: | ||
help: Create S3 credentials for development | ||
run: ./scripts/dev/create-s3-credential.sh | ||
|
||
conda: | ||
tasks: | ||
lock: | ||
help: Generate lock files for Conda environments | ||
run: | | ||
cd conda | ||
rm -f conda-*.lock | ||
conda-lock --conda `which mamba` -f prod.yaml -p osx-64 -p linux-64 --kind explicit |
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,53 @@ | ||
version: 1.0 | ||
compose-app: docker compose | ||
env-file: .env | ||
|
||
defaults: | ||
group: {{ env.ENV }} | ||
|
||
groups: | ||
airflow: | ||
project-name: egh-airflow | ||
compose-path: | ||
- containers/compose-airflow.yaml | ||
env-file: containers/airflow/.env | ||
services: | ||
default: webserver,scheduler,worker,triggerer | ||
available: | ||
- name: webserver | ||
- name: scheduler | ||
- name: worker | ||
- name: triggerer | ||
- name: airflow-cli | ||
|
||
dev: | ||
project-name: egh-dev | ||
env-file: .env | ||
compose-path: | ||
- containers/compose-base.yaml | ||
- containers/compose-dev.yaml | ||
services: | ||
default: superset,flower,minio,postgres | ||
available: | ||
- name: superset | ||
# - name: airflow | ||
- name: postgres | ||
- name: minio | ||
- name: redis | ||
- name: flower | ||
|
||
prod: | ||
project-name: egh-prod | ||
env-file: .env | ||
compose-path: | ||
- containers/compose-base.yaml | ||
- containers/compose-prod.yaml | ||
services: | ||
default: superset,flower,minio,postgres | ||
available: | ||
- name: superset | ||
# - name: airflow | ||
- name: postgres | ||
- name: minio | ||
- name: redis | ||
- name: flower |
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.