diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4341ab8e..7c1a817c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,10 +97,8 @@ jobs: run: poetry install - name: Lint run: | - poetry run pylint hydrocron_api - poetry run flake8 hydrocron_api - - + poetry run pylint hydrocronapi + poetry run flake8 hydrocronapi ## Set environment variables - name: Configure Initial YAML file and environment variables run: | @@ -110,7 +108,6 @@ jobs: echo "GITHUB_REF_READABLE=${GITHUB_REF_READABLE}" >> $GITHUB_ENV echo "THE_ENV=sit" >> $GITHUB_ENV echo "TARGET_ENV_UPPERCASE=SIT" >> $GITHUB_ENV - - name: Run Snyk as a blocking step uses: snyk/actions/python-3.9@master env: @@ -155,31 +152,16 @@ jobs: - name: Build Python Artifact run: | poetry build - - name: Test with pytest if: | github.ref == 'test' run: | - poetry run pytest tests/test_api.py -k 'test_gettimeseries_get' - poetry run pytest tests/test_hydrocron_database.py - poetry run pytest tests/test_io_swot_reach_node_shp.py - - - - ## Set environment variables - - name: Configure Initial YAML file and environment variables - run: | - echo "THE_VERSION=${{ env.software_version }}" >> $GITHUB_ENV; - echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV; - GITHUB_REF_READABLE="${GITHUB_REF//\//-}" - echo "GITHUB_REF_READABLE=${GITHUB_REF_READABLE}" >> $GITHUB_ENV - echo "THE_ENV=sit" >> $GITHUB_ENV - echo "TARGET_ENV_UPPERCASE=SIT" >> $GITHUB_ENV - + pytest tests/test_api.py -k 'test_gettimeseries_get' + # Setup docker to build and push images - name: Log in to the Container registry - if: ${{ startsWith(github.ref, 'test') }} + #if: ${{ startsWith(github.ref, 'test') }} uses: docker/login-action@v1 with: registry: ${{ env.REGISTRY }} @@ -187,17 +169,16 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker - if: ${{ startsWith(github.ref, 'test') }} + #if: ${{ startsWith(github.ref, 'test') }} id: meta uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{version}},value=${{ env.THE_VERSION }} - type=raw,value="0.0.1" - + type=raw,value=${{ env.THE_ENV }} - name: Build and push Docker image - if: ${{ startsWith(github.ref, 'test') }} + #if: ${{ startsWith(github.ref, 'test') }} #if: | # github.ref == 'refs/heads/develop' || # github.ref == 'refs/heads/main' || diff --git a/terraform/variables.tf b/terraform/variables.tf index 10015f95..ef735720 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -24,7 +24,7 @@ variable "profile" { } variable "docker_tag" { - default = "ghcr.io/podaac/hydrocron-api:0.0.1" + default = "ghcr.io/podaac/hydrocron-api:sit" } variable "service_name" {