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: Docker build failing #230

Merged
merged 4 commits into from
Mar 18, 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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ orbs:
defaults: &defaults
working_directory: ~/app
docker:
- image: cimg/node:12.22.2
- image: cimg/node:20.11
environment:
# To avoid ENOMEM problem when running node
NODE_OPTIONS: '--max-old-space-size=4096'
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: "CI"
name: 'CI'

on:
workflow_dispatch:
pull_request:
branches:
- "main"
- "feature/**"
- 'main'
- 'feature/**'
push:
branches:
- "main"
- 'main'

jobs:
ci:
name: Build & Test
runs-on: ubuntu-latest

steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
- name: 'Check out the repo'
uses: 'actions/checkout@v3'

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 20.11

- name: Install dependencies
run: "yarn install --immutable"
run: 'yarn install --immutable'

- name: Build packages
run: yarn build
Expand All @@ -38,4 +38,3 @@ jobs:

- name: Run tests
run: yarn run test --maxWorkers 2

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# docker push oracletest.azurecr.io/test/oracle:$COMMIT_SHA

# First stage, builder to install devDependencies to build TypeScript
FROM node:18.18.0 as BUILDER
FROM node:20.11 as BUILDER

RUN apt-get update
RUN apt-get install -y libusb-1.0-0-dev
Expand All @@ -28,7 +28,7 @@ COPY src src
RUN yarn build

# Second stage, create slimmed down production-ready image
FROM node:18.18.0
FROM node:20.11
ARG COMMIT_SHA

RUN apt-get update
Expand Down
33 changes: 0 additions & 33 deletions dockerfiles/continuous-integration/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"@celo/typescript": "^0.0.1",
"@types/bunyan": "^1.8.6",
"@types/express": "^4.17.6",
"@types/jest": "28.1.2",
"@types/jest": "29.5.12",
"@types/mathjs": "^6.0.5",
"@types/node-fetch": "^2.5.5",
"jest": "28.1.2",
"jest": "29.7.0",
"prettier": "2.1.1",
"ts-jest": "^28.0.5",
"ts-jest": "^29.1.2",
"tslint": "^6.1.1",
"tslint-config-prettier": "^1.18.0",
"tslint-eslint-rules": "^5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion test/exchange_adapters/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('BaseExchangeAdapter', () => {
await expect(async () =>
adapter.fetchFromApi(ExchangeDataType.TICKER, mockTickerEndpoint)
).rejects.toThrowError(
'Failed to parse JSON response: FetchError: invalid json response body at reason: Unexpected token < in JSON at position 0'
'Failed to parse JSON response: FetchError: invalid json response body at reason: Unexpected token \'<\', "<html>blah"... is not valid JSON'
)
expect(metricCollector.exchangeApiRequestError).toBeCalledWith(
...metricArgs,
Expand Down
Loading
Loading