Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vggonzal authored and vggonzal committed Aug 2, 2023
1 parent 2bed131 commit 35c4a84
Showing 1 changed file with 12 additions and 41 deletions.
53 changes: 12 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,50 +93,21 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Setup DynamoDB Local
id: setupdb
uses: actions/checkout@v2
with:
dbPath: # undefined by default, if this is undefined inMemory will be used
sharedDb: # undefined by default
delayTransientStatuses: # undefined by default
optimizeDbBeforeStartup: # undefined by default
port: 8000
cors: '*'

- name: Get DynamoDB Item
id: config
uses: actions/checkout@v2
env:
AWS_DEFAULT_REGION: us-west-2
AWS_REGION: us-west-2
AWS_ACCESS_KEY_ID: a
AWS_SECRET_ACCESS_KEY: a
AWS_SESSION_TOKEN: fake_session_token
with:
operation: get
region: us-west-2
table: hydrocron_swot_reaches
key: |
{ key: "reach_id" }
- name: Print item
- name: Install dependencies
run: |
echo '${{ steps.config.outputs.item }}'
python3 -m pip install --upgrade pip
pip3 install pytest pytest-cov
pip3 install -r requirements.txt
- name: Print specific field using built-in function
run: |
echo '${{ steps.config.outputs.item }}'
- name: Setup local DynamoDB
run: docker run -d -p 8000:8000 amazon/dynamodb-local

- name: Print specific field using jq
run: |
jq '.commit' <<< '${{ steps.config.outputs.item }}'
- name: Load sample
run: python3 tests/example_load_data.py

- name: Setup local DynamoDB
run: aws dynamodb list-tables --endpoint-url http://localhost:8000

- name: Test with pytest
id: tests
run: |
python3 -m pip install --upgrade pip
pip3 install pytest pytest-cov
pip3 install -r requirements.txt
python3 tests/example_load_data.py
pytest tests/test_api.py
run: pytest tests/test_api.py

0 comments on commit 35c4a84

Please sign in to comment.