feat: allow dataset source to contain an array of sources #676
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| STAC_API_URL: "" | |
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| CDK_DEFAULT_ACCOUNT: ${{ secrets.AWS_ACCOUNT_ID }} | |
| CDK_DEFAULT_REGION: us-west-2 | |
| AWS_ACCESS_KEY_ID: secrets.AWS_ACCESS_KEY_ID | |
| AWS_SECRET_ACCESS_KEY: secrets.AWS_SECRET_ACCESS_KEY | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
| id: extract_branch | |
| - name: Check out repository code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.9 | |
| - name: Create Config.yml | |
| uses: franzbischoff/replace_envs@v1 | |
| env: | |
| PROJECT_NAME: 'biomass' | |
| DATA_BUCKET: 'biomass-earthdata-dashboard' | |
| STAGE: ${{ steps.extract_branch.outputs.branch }} | |
| STAC_API_URL: '' | |
| VECTOR_TILESERVER_URL: 'https://mbtileserver.dev.maap-project.org/services' | |
| TITILER_SERVER_URL: 'https://titiler.maap-project.org' | |
| with: | |
| from_file: 'stack/config.yml.example' | |
| to_file: 'stack/config.yml' | |
| commit: 'false' | |
| - name: Install python packages | |
| run: | | |
| python -m pip install -U pip setuptools packaging virtualenv | |
| python -m pip install .["dev,test"] | |
| - name: run pre-commit | |
| run: pre-commit run --all-files | |
| - name: Run safety dependency vulnerability check | |
| # ignore some vulnerabilities in twisted and httplib2 that are already installed and can't be uninstalled | |
| run: safety check -i 39557 -i 37040 -i 37209 -i 37554 -i 38085 -i 38368 -i 38303 -i 39608 | |
| - name: Run bandit static analysis check | |
| run: bandit -r dashboard_api | |
| # - name: Run test | |
| # run: python -m pytest tests/ | |
| synth: | |
| needs: [tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
| id: extract_branch | |
| - name: Check out repository code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.9 | |
| - uses: actions/setup-node@v2 | |
| with: | |
| node-version: '12' | |
| - name: Cache Node.js modules | |
| uses: actions/cache@v2 | |
| with: | |
| # npm cache files are stored in `~/.npm` on Linux/macOS | |
| path: ~/.npm | |
| key: ${{ runner.OS }}-node-${{ hashFiles('package.json') }} # or package-lock.json | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Create Config.yml | |
| uses: franzbischoff/replace_envs@v1 | |
| env: | |
| PROJECT_NAME: 'biomass' | |
| DATA_BUCKET: 'biomass-earthdata-dashboard' | |
| STAGE: ${{ steps.extract_branch.outputs.branch }} | |
| STAC_API_URL: '' | |
| VECTOR_TILESERVER_URL: 'https://mbtileserver.dev.maap-project.org/services' | |
| TITILER_SERVER_URL: 'https://titiler.maap-project.org' | |
| with: | |
| from_file: 'stack/config.yml.example' | |
| to_file: 'stack/config.yml' | |
| commit: 'false' | |
| - name: Install AWS CDK | |
| run: npm install -g | |
| - name: Install python packages | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install .["deploy"] | |
| - name: Run CDK synth | |
| run: npm run cdk-synth |