Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure apps build consistently in docker and locally #231

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading