From b9b2f256bd800e49b0baaa44de8ef6b075c2dba8 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Mon, 26 Apr 2021 13:05:04 +0300 Subject: [PATCH] Fix GH actions --- .env.example | 2 +- .github/workflows/test.yml | 45 ++++---------------------------------- 2 files changed, 5 insertions(+), 42 deletions(-) diff --git a/.env.example b/.env.example index 5c9a451c2..6ba2f2149 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ STORAGE_ACCESS_KEY_ID=minio_access_key STORAGE_SECRET_ACCESS_KEY=minio_secret_key STORAGE_BUCKET_NAME=qfieldcloud-local STORAGE_REGION_NAME= -STORAGE_ENDPOINT_URL=http://s3:9000 +STORAGE_ENDPOINT_URL=http://localhost:9000 MINIO_PORT=9000 WEB_HTTP_PORT=80 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae6e47808..413c40649 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,47 +22,10 @@ jobs: run: | pipenv install pre_commit pipenv run python -m pre_commit run --all-files - - name: Create .env file from secret - uses: SpicyPizza/create-envfile@v1 - with: - envkey_DEBUG: 1 - envkey_QFIELDCLOUD_HOST: "localhost" - envkey_SECRET_KEY: ${{ secrets.SECRET_KEY }} - envkey_WEB_HTTP_PORT: 80 - envkey_WEB_HTTPS_PORT: 443 - envkey_POSTGRES_USER: "qfieldcloud_test_db_admin" - envkey_POSTGRES_PASSWORD: ${{ secrets.SQL_PASSWORD }} - envkey_POSTGRES_DB: "qfieldcloud_test_db" - envkey_POSTGRES_HOST: "db" - envkey_POSTGRES_PORT: 5432 - envkey_HOST_POSTGRES_PORT: 5433 - envkey_DJANGO_ALLOWED_HOSTS: "localhost 127.0.0.1 [::1]" - envkey_DJANGO_SETTINGS_MODULE: "qfieldcloud.settings" - envkey_STORAGE_ACCESS_KEY_ID: "minio_access_key" - envkey_STORAGE_SECRET_ACCESS_KEY: "minio_secret_key" - envkey_STORAGE_BUCKET_NAME: "qfieldcloud-gh-action" - envkey_STORAGE_REGION_NAME: "" - envkey_STORAGE_ENDPOINT_URL: "http://localhost:9000" - envkey_MINIO_PORT: 9000 - envkey_REDIS_HOST: "redis" - envkey_REDIS_PASSWORD: "reeeeeedissssssss" - envkey_REDIS_PORT: 6379 - envkey_GEODB_HOST: "geodb" - envkey_GEODB_USER: "postgres" - envkey_GEODB_PASSWORD: ${{ secrets.GEODB_PASSWORD }} - envkey_GEODB_DB: "postgres" - envkey_GEODB_PORT: 5432 - envkey_CADDY_ACME_CA: "https://acme-staging-v02.api.letsencrypt.org/directory" - envkey_ACCOUNT_EMAIL_VERIFICATION: "optional" - envkey_EMAIL_HOST: "smtp4dev" - envkey_EMAIL_USE_TLS: False - envkey_EMAIL_PORT: 25 - envkey_EMAIL_HOST_USER: "" - envkey_EMAIL_HOST_PASSWORD: "" - envkey_LOG_DIRECTORY: "/tmp/" - envkey_TMP_DIRECTORY: "/tmp/" - envkey_COMPOSE_PROJECT_NAME: "qfc" - file_name: ".env" + - name: Export the env variables file + run: | + cp .env.example .env + export $(egrep -v '^#' .env | xargs) - name: Build and run docker containers run: | docker-compose up -d --build