Skip to content

Commit

Permalink
ci: pytest workflow only set essential vars
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 15, 2023
1 parent 35d2035 commit 52a3c5b
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/r-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,24 @@ permissions:
contents: read

jobs:
extract-vars:
uses: ./.github/workflows/r-extract_vars.yml
with:
environment: ${{ inputs.environment || 'test' }}

run-pytest:
runs-on: ubuntu-latest
needs: [extract-vars]
environment: ${{ inputs.environment || 'test' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Environment to .env
env:
API_VERSION: ${{ needs.extract-vars.outputs.api_version }}
API_TAG_OVERRIDE: ${{ inputs.image_tag }}
FRONTEND_MAIN_VERSION: ${{ needs.extract-vars.outputs.frontend_main_version }}
FRONTEND_MAIN_URL: ${{ vars.FRONTEND_MAIN_URL }}
URL_SCHEME: http
API_URL: http://api:8000
ODK_CENTRAL_URL: ${{ vars.ODK_CENTRAL_URL }}
ODK_CENTRAL_USER: ${{ vars.ODK_CENTRAL_USER }}
ODK_CENTRAL_PASSWD: ${{ secrets.ODK_CENTRAL_PASSWD }}
OSM_CLIENT_ID: ${{ secrets.OSM_CLIENT_ID }}
OSM_CLIENT_SECRET: ${{ secrets.OSM_CLIENT_SECRET }}
OSM_SECRET_KEY: ${{ secrets.OSM_SECRET_KEY }}
run: |
echo "APP_VERSION=${API_VERSION}" >> .env
echo "API_TAG_OVERRIDE=${API_TAG_OVERRIDE}" >> .env
echo "FRONTEND_MAIN_VERSION=${FRONTEND_MAIN_VERSION}" >> .env
echo "FRONTEND_MAIN_URL=${FRONTEND_MAIN_URL}" >> .env
echo "URL_SCHEME=${URL_SCHEME}" >> .env
echo "API_URL=${API_URL}" >> .env
echo "ODK_CENTRAL_URL=${ODK_CENTRAL_URL}" >> .env
echo "ODK_CENTRAL_USER=${ODK_CENTRAL_USER}" >> .env
echo "ODK_CENTRAL_PASSWD=${ODK_CENTRAL_PASSWD}" >> .env
Expand Down

0 comments on commit 52a3c5b

Please sign in to comment.