ci: fix api docker builds, upgrade to node 20, ignore ord from coverage (#426)

* ci: fix api docker builds, upgrade to node 20

* try again, ignore ord

* fix dockerignore

* restore ci order
This commit is contained in:
Rafael Cárdenas
2025-02-13 10:51:20 -06:00
committed by GitHub
parent 19c8a79cd2
commit 3409345e33
6 changed files with 15 additions and 20 deletions

2
.codecov.yml Normal file
View File

@@ -0,0 +1,2 @@
ignore:
- "components/ord"

View File

@@ -1,9 +1,4 @@
target/
examples/
dockerfiles/
Dockerfile
.dockerignore
.git*
node_modules
package-lock.json
*.tar.gz
/target/
/dockerfiles/
node_modules/
tmp/

View File

@@ -162,10 +162,9 @@ jobs:
cargo tarpaulin --skip-clean --out lcov -- --test-threads=1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: hirosystems/ordhook
- name: Print integration environment logs
run: cat docker-compose-logs.txt
@@ -286,7 +285,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
hirosystems/${{ matrix.suite }}
hirosystems/${{ matrix.suite }}-api
tags: |
type=ref,event=branch
type=ref,event=pr
@@ -302,8 +301,8 @@ jobs:
- name: Build/Tag/Push Image
uses: docker/build-push-action@v5
with:
context: ./api/${{ matrix.suite }}
file: ./api/${{ matrix.suite }}/Dockerfile
context: .
file: ./dockerfiles/components/${{ matrix.suite }}-api.dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Only push if (there's a new release on main branch, or if building a non-main branch) and (Only run on non-PR events or only PRs that aren't from forks)

View File

@@ -1,2 +0,0 @@
**/node_modules
**/tmp

View File

@@ -1 +1 @@
18
20

View File

@@ -1,10 +1,11 @@
FROM node:18-alpine
FROM node:20-alpine
WORKDIR /app
COPY . .
COPY ./api/ordinals /app
COPY .git /.git
RUN apk add --no-cache --virtual .build-deps git
RUN npm ci && \
RUN npm ci --no-audit && \
npm run build && \
npm run generate:git-info && \
npm prune --production