Skip to content

Commit

Permalink
Merge branch 'develop' into feature/new-data-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
cephaschapa authored Mar 19, 2024
2 parents 7ab8981 + 4e360c9 commit 49b7a64
Show file tree
Hide file tree
Showing 14 changed files with 727 additions and 520 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/web-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,25 @@ jobs:
- name: Run tests and generate coverage file
run: npm run ci:test

- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: ./app/lcov*.info
minimum-coverage: 40
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./app
update-comment: true
# - name: Setup LCOV
# uses: hrishikesh-kadam/setup-lcov@v1
# - name: Report code coverage
# uses: zgosalvez/github-actions-report-lcov@v3
# with:
# coverage-files: ./app/lcov*.info
# minimum-coverage: 40
# artifact-name: code-coverage-report
# github-token: ${{ secrets.GITHUB_TOKEN }}
# working-directory: ./app
# update-comment: true

- name: Upload coverage reports to Codecov
continue-on-error: true
uses: codecov/[email protected]
with:
fail_ci_if_error: false
flag: unittests
name: citycatalyst-backend
token: ${{ secrets.CODECOV_TOKEN }}
slug: Open-Earth-Foundation/CityCatalyst

Expand Down
61 changes: 30 additions & 31 deletions .github/workflows/web-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
- k8s/cc-migrate.yml
- k8s/cc-web-deploy.yml
- k8s/cc-web.yml
- .github/workflows/web-actions.yml
- .github/workflows/web-tag.yml
tags:
- '^v\d+\.\d+\.\d+$'
- '^v\d+\.\d+\.\d+$'

jobs:
runTests:
Expand All @@ -28,7 +28,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"
cache-dependency-path: app/package-lock.json

- name: Install dependencies
Expand Down Expand Up @@ -59,34 +59,33 @@ jobs:
needs: runTests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pushing citycatalyst to GHCR
env:
SHA: ${{ github.sha }}
REF: ${{ github.ref }}
IMAGE: ghcr.io/open-earth-foundation/citycatalyst
- name: Pushing citycatalyst to GHCR
env:
SHA: ${{ github.sha }}
REF: ${{ github.ref }}
IMAGE: ghcr.io/open-earth-foundation/citycatalyst

run: |
export VERSION=${REF#refs/tags/v}
export MAJOR=${VERSION%.*.*}
export MINOR=${VERSION%.*}
echo Version: ${VERSION} Major: ${MAJOR} Minor: ${MINOR}
docker build -t $IMAGE:$SHA app
docker tag $IMAGE:$SHA $IMAGE:$VERSION
docker tag $IMAGE:$SHA $IMAGE:$MAJOR
docker tag $IMAGE:$SHA $IMAGE:$MINOR
docker tag $IMAGE:$SHA $IMAGE:stable
docker push $IMAGE:$SHA
docker push $IMAGE:$VERSION
docker push $IMAGE:$MAJOR
docker push $IMAGE:$MINOR
docker push $IMAGE:stable
run: |
export VERSION=${REF#refs/tags/v}
export MAJOR=${VERSION%.*.*}
export MINOR=${VERSION%.*}
echo Version: ${VERSION} Major: ${MAJOR} Minor: ${MINOR}
docker build -t $IMAGE:$SHA app
docker tag $IMAGE:$SHA $IMAGE:$VERSION
docker tag $IMAGE:$SHA $IMAGE:$MAJOR
docker tag $IMAGE:$SHA $IMAGE:$MINOR
docker tag $IMAGE:$SHA $IMAGE:stable
docker push $IMAGE:$SHA
docker push $IMAGE:$VERSION
docker push $IMAGE:$MAJOR
docker push $IMAGE:$MINOR
docker push $IMAGE:stable
Loading

0 comments on commit 49b7a64

Please sign in to comment.