Skip to content

Commit

Permalink
add env vars to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Jul 31, 2024
1 parent 1e06d72 commit 1d7a1b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,22 @@ on:
- 'test_harvest_restrictions.py'
- 'source.schema.json'
- 'sources.json'
env:
DATABASE_URL: ${{ vars.DATABASE_URL }}
AWS_ENDPOINT_URL: ${{ vars.AWS_ENDPOINT_URL }}
AWS_S3_ENDPOINT: ${{ vars.AWS_S3_ENDPOINT }}
AWS_VIRTUAL_HOSTING: ${{ vars.AWS_VIRTUAL_HOSTING }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
OBJECTSTORE_BUCKET: ${{ secrets.OBJECTSTORE_BUCKET }}
AWS_EC2_METADATA_DISABLED: ${{ vars.AWS_EC2_METADATA_DISABLED }}
CPL_VSISTDIN_BUFFER_LIMIT: ${{ vars.CPL_VSISTDIN_BUFFER_LIMIT }}
jobs:
test:
runs-on: ubuntu-latest
name: test
container: ghcr.io/bcgov/harvest-restrictions:main
environment: production
services:
postgres:
image: postgis/postgis:16-3.4
Expand Down
2 changes: 1 addition & 1 deletion test_harvest_restrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def test_invalid_file():
sources = [
s for s in parse_sources(SOURCES) if s["alias"] == "crd_water_supply_area"
]
sources[0]["name_column"] = "INVALID_COLUMN_NAME"
sources[0]["name_column"] = "INVALID_COLUMN"
with pytest.raises(ValueError):
sources = validate_sources(sources)

0 comments on commit 1d7a1b4

Please sign in to comment.