Skip to content

fix!: datetime and collection id validation fixes as improve collection extent method #89

fix!: datetime and collection id validation fixes as improve collection extent method

fix!: datetime and collection id validation fixes as improve collection extent method #89

Workflow file for this run

name: CICD
on:
push:
branches:
- 'main'
- 'dev'
- 'production'
pull_request:
types: [ opened, reopened, edited, synchronize ]
jobs:
test:
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: us-west-2
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
cache-dependency-path: |
requirements.txt
api/requirements.txt
- name: Install Dependencies
run: |
pip install \
--upgrade \
--upgrade-strategy eager \
-r requirements.txt \
-r api/requirements.txt
- name: Run Tests
run: |
pytest
- name: Run Linters
uses: wearerequired/lint-action@v2
with:
black: true
black_args: api cdk
flake8: true
flake8_args: api cdk --max-line-length=131
isort: true
isort_args: api cdk
gitflow-enforcer:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'main' && github.head_ref != 'dev' || github.base_ref == 'production' && github.head_ref != 'main'
run: |
echo "ERROR: You can only merge to main from dev and to production from main"
exit 1
deploy-to-dev:
needs: gitflow-enforcer
if: github.ref_name == 'dev'
concurrency: development
uses: "./.github/workflows/deploy.yml"
with:
environment: development
stage: "dev"
role-session-name: "veda-stac-ingestor-github-development-deployment"
aws-region: "us-west-2"
secrets: inherit
deploy-to-staging:
needs: gitflow-enforcer
if: github.ref_name == 'main'
concurrency: staging
uses: "./.github/workflows/deploy.yml"
with:
environment: staging
stage: "staging"
role-session-name: "veda-stac-ingestor-github-staging-deployment"
aws-region: "us-west-2"
secrets: inherit
deploy-to-production:
needs: gitflow-enforcer
if: github.ref_name == 'production'
concurrency: production
uses: "./.github/workflows/deploy.yml"
with:
environment: production
stage: "production"
role-session-name: "veda-stac-ingestor-github-production-deployment"
aws-region: "us-west-2"
secrets: inherit