Skip to content

Clean up geocodio and google maps api logic #24

Clean up geocodio and google maps api logic

Clean up geocodio and google maps api logic #24

---
name: test-full-build
on:
workflow_dispatch:
push:
branches-ignore: # update-data.yml runs on push to main and dev so it's duplicative to run this test as well
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
env:
GEOCODIO_API_KEY: ${{ secrets.GEOCODIO_API_KEY }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Who owns the workspace?
run: ls -ld $GITHUB_WORKSPACE
- uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.DGM_GITHUB_ACTION_CREDENTIALS }}"
- name: Display env variables
run: |
echo "Workspace directory: $GITHUB_WORKSPACE" \
echo "Google credentials path: $GOOGLE_GHA_CREDS_PATH" \
# Give the dbcp user ownership of the workspace
# So it can read and write files to the workspace
- name: Give the dbcp user ownership of the workspace
run: sudo chown -R 1000:1000 $GITHUB_WORKSPACE
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Build and run Docker Compose services
run: |
docker-compose up -d
- name: Run full ETL
run: |
make all
- name: Run all test
run: |
make test
- name: Stop Docker Compose services
if: always()
run: |
docker-compose down
# The google-github-actions/auth step is run as runner:docker,
# so we need to give the workspace back to runner:docker
- name: Give ownership of the workspace back to root
if: always()
run: sudo chown -R runner:docker $GITHUB_WORKSPACE
- name: Who owns the workspace?
if: always()
run: ls -ld $GITHUB_WORKSPACE