mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-01-12 22:43:06 +08:00
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:
2
.codecov.yml
Normal file
2
.codecov.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ignore:
|
||||||
|
- "components/ord"
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
target/
|
/target/
|
||||||
examples/
|
/dockerfiles/
|
||||||
dockerfiles/
|
node_modules/
|
||||||
Dockerfile
|
tmp/
|
||||||
.dockerignore
|
|
||||||
.git*
|
|
||||||
node_modules
|
|
||||||
package-lock.json
|
|
||||||
*.tar.gz
|
|
||||||
|
|||||||
9
.github/workflows/ci.yaml
vendored
9
.github/workflows/ci.yaml
vendored
@@ -162,10 +162,9 @@ jobs:
|
|||||||
cargo tarpaulin --skip-clean --out lcov -- --test-threads=1
|
cargo tarpaulin --skip-clean --out lcov -- --test-threads=1
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v4.0.1
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
slug: hirosystems/ordhook
|
|
||||||
|
|
||||||
- name: Print integration environment logs
|
- name: Print integration environment logs
|
||||||
run: cat docker-compose-logs.txt
|
run: cat docker-compose-logs.txt
|
||||||
@@ -286,7 +285,7 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
hirosystems/${{ matrix.suite }}
|
hirosystems/${{ matrix.suite }}-api
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
@@ -302,8 +301,8 @@ jobs:
|
|||||||
- name: Build/Tag/Push Image
|
- name: Build/Tag/Push Image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: ./api/${{ matrix.suite }}
|
context: .
|
||||||
file: ./api/${{ matrix.suite }}/Dockerfile
|
file: ./dockerfiles/components/${{ matrix.suite }}-api.dockerfile
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
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)
|
# 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)
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
**/node_modules
|
|
||||||
**/tmp
|
|
||||||
@@ -1 +1 @@
|
|||||||
18
|
20
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
FROM node:18-alpine
|
FROM node:20-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY ./api/ordinals /app
|
||||||
|
COPY .git /.git
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual .build-deps git
|
RUN apk add --no-cache --virtual .build-deps git
|
||||||
RUN npm ci && \
|
RUN npm ci --no-audit && \
|
||||||
npm run build && \
|
npm run build && \
|
||||||
npm run generate:git-info && \
|
npm run generate:git-info && \
|
||||||
npm prune --production
|
npm prune --production
|
||||||
Reference in New Issue
Block a user