Skip to content

Commit

Permalink
chore: use yarn (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianogoldman authored Aug 14, 2024
1 parent 0c1bdc4 commit cbf0c7d
Show file tree
Hide file tree
Showing 10 changed files with 2,963 additions and 8,534 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
Expand Down Expand Up @@ -83,4 +86,4 @@ jobs:
dockerImage: quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }}
serviceName: ${{ matrix.service_name }}
env: dev prd
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/manual-build-conversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build image
id: docker_build
if: ${{ inputs.build }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
push: false
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
--outDir /artifact \
--logFile /artifact/log.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.pointer }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
dockerImage: "quay.io/decentraland/${{ matrix.service_name }}:${{ inputs.tag }}"
serviceName: "${{ matrix.service_name }}"
env: ${{ inputs.deployment-environment }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 8 additions & 8 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: node
name: Consumer Server

on:
push:
Expand All @@ -7,22 +7,22 @@ jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: true
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
cache-dependency-path: consumer-server/package-lock.json
cache: yarn
cache-dependency-path: consumer-server/yarn.lock
- name: install
run: npm ci
run: yarn --frozen-lockfile
working-directory: consumer-server
- name: build
run: npm run build
run: yarn build
working-directory: consumer-server
- name: test
run: npm run test
run: yarn test
working-directory: consumer-server
9 changes: 9 additions & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: validate-pr-title

on:
pull_request:
types: [edited, opened, reopened, synchronize]

jobs:
title-matches-convention:
uses: decentraland/actions/.github/workflows/validate-pr-title.yml@main
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ RUN chmod +x /tini

# install dependencies
COPY consumer-server/package.json /consumer-server/package.json
COPY consumer-server/package-lock.json /consumer-server/package-lock.json
RUN npm ci
COPY consumer-server/yarn.lock /consumer-server/yarn.lock
RUN yarn --frozen-lockfile

# Make commit hash available to application
ARG COMMIT_HASH=Unknown
RUN echo "COMMIT_HASH=$COMMIT_HASH" >> .env

# build the consumer-server
COPY consumer-server /consumer-server
RUN npm run build
RUN npm run test
RUN yarn build
RUN yarn test

# remove devDependencies, keep only used dependencies
RUN npm ci --only=production
RUN yarn --prod --frozen-lockfile

########################## END OF BUILD STAGE ##########################

Expand Down
1 change: 1 addition & 0 deletions consumer-server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules/
coverage

.env
package-lock.json
Loading

0 comments on commit cbf0c7d

Please sign in to comment.