From ce88f6e43e45cf1193257e869356ecd2f3f01e8f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 4 Jan 2021 22:32:20 +1300 Subject: [PATCH] Move env variable to on place in gh workflow config --- .github/workflows/ci.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2041b28ad..97e691d5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,18 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 + env: + APP_DOMAIN_NAME: localhost:3000 + APP_PROTOCOL: http + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test + DEVISE_SECRET_KEY: secret + ELASTIC_SEARCH_VERSION: "7.5.1-amd64" + GROWSTUFF_EMAIL: "noreply@test.growstuff.org" + GROWSTUFF_SITE_NAME: "Growstuff (travis)" + RAILS_ENV: test + RAILS_SECRET_TOKEN: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' + RAILS_SECRET_TOKEN: supersecret steps: - name: Checkout this repo @@ -96,20 +108,7 @@ jobs: ./cc-test-reporter before-build - name: Prepare database for testing - env: - DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test - DEVISE_SECRET_KEY: secret - RAILS_SECRET_TOKEN: supersecret - RAILS_ENV: test - run: | - bundle exec rails db:prepare + run: bundle exec rails db:prepare - name: Run rspec (report results to Percy.io and CodeClimate) - env: - DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test - DEVISE_SECRET_KEY: secret - RAILS_SECRET_TOKEN: supersecret - APP_DOMAIN_NAME: localhost:3000 - APP_PROTOCOL: http - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} run: bundle exec rspec spec && ./cc-test-reporter after-build