Skip to content

Commit

Permalink
fix: ensure apps build consistently in docker and locally
Browse files Browse the repository at this point in the history
withing the context of the monorepo

refs #209
  • Loading branch information
ygrishajev committed Jun 7, 2024
1 parent d78c076 commit 371acf2
Show file tree
Hide file tree
Showing 39 changed files with 6,589 additions and 95,876 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Build the Docker image
if: steps.filter.outputs.deploy-web == 'true'
run: docker build ./apps/deploy-web
run: docker build -f docker/Dockerfile.deploy-web -t console-deploy-web .
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Build the Docker image
if: steps.filter.outputs.indexer == 'true'
run: docker build -f Dockerfile.indexer -t cloudmos-indexer .
run: docker build -f docker/Dockerfile.indexer -t console-indexer .
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-landing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Build the Docker image for LANDING
if: steps.filter.outputs.landing == 'true'
run: docker build ./apps/landing
run: docker build -f docker/Dockerfile.landing -t console-landing .
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-provider-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Build the Docker image
if: steps.filter.outputs.provider-proxy == 'true'
run: docker build ./apps/provider-proxy
run: docker build -f docker/Dockerfile.provider-proxy -t console-provider-proxy .
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-stats-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Build the Docker image
if: steps.filter.outputs.stats-web == 'true'
run: docker build ./apps/stats-web
run: docker build -f docker/Dockerfile.stats-web -t console-stats-web .
20 changes: 9 additions & 11 deletions .github/workflows/validate-n-build-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,27 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.20.2
cache: npm
cache-dependency-path: package-lock.json

- name: Setup Local Deps
- name: Restore root node_modules cache
if: steps.filter.outputs.api == 'true'
uses: actions/setup-node@v4
uses: martijnhols/actions-cache@v3
id: cache-root
with:
node-version: 18.20.2
cache: npm
cache-dependency-path: apps/api/package-lock.json
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
if: steps.filter.outputs.api == 'true'
run: npm ci --workspace=apps/api
if: steps.filter.outputs.api == 'true' && (steps.cache-root.outputs.cache-hit != 'true' || steps.cache-api.outputs.cache-hit != 'true')
run: npm ci

- name: Run static code analysis
if: steps.filter.outputs.api == 'true'
run: npm run lint --workspace=apps/api
run: npm run lint:api

- name: Run unit tests
if: steps.filter.outputs.api == 'true'
run: npm run test:unit --workspace=apps/api

- name: Build the Docker image for API
if: steps.filter.outputs.api == 'true'
run: docker build -f Dockerfile.api -t cloudmos-api .
run: docker build -f docker/Dockerfile.api -t console-api .
Loading

0 comments on commit 371acf2

Please sign in to comment.