Skip to content

Commit

Permalink
conflicts fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kadamidev committed Dec 17, 2024
2 parents 809d03e + 1afbe39 commit d26fb61
Show file tree
Hide file tree
Showing 145 changed files with 14,961 additions and 4,128 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ NODE_ENV=dev

PORT=5420

# Kubo RPC endpoints
IPFS_NODE_URL=http://host.docker.internal:5001
PUBLIC_IPFS_RESOLVER=http://host.docker.internal:5002

# Kubo path gateway endpoint
IPFS_RESOLVER_OVERRIDE=http://host.docker.internal:8089/ipfs

### Database - Postgres
Expand Down Expand Up @@ -161,4 +163,4 @@ ES_DB_USER=
ES_DB_PASSWORD=

### open Alex Database - Postgres
OPEN_ALEX_DATABASE_URL=postgresql://username:password@host/database?schema=openalex
OPEN_ALEX_DATABASE_URL=postgresql://username:password@host/database?schema=openalex
22 changes: 21 additions & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- desci-server/**
- desci-repo/**
- desci-contracts/**
- sync-server/**
- Dockerfile

name: Test desci-server
Expand All @@ -32,6 +33,12 @@ jobs:
# options: --user 1001

steps:
- name: Delete huge unnecessary tools folder
run: |
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
rm -rf /opt/hostedtoolcache
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
- name: Check out repository
uses: actions/checkout@v4

Expand All @@ -49,12 +56,15 @@ jobs:
desci-repo/yarn.lock
- name: Install dependencies
run: cd desci-models && npm i -g yarn && yarn && yarn build && cd ../desci-server && yarn --ignore-engines && cd ../desci-repo && yarn
run: |
cd desci-models && npm i -g yarn && yarn && yarn build && cd ../desci-server && yarn --ignore-engines && cd ../desci-repo && yarn
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
- name: Stub contract
run: |
echo "{\"proxies\":[{\"address\":\"\"}]}" > desci-server/src/desci-contracts-config/unknown-research-object.json
echo "{\"proxies\":[{\"address\":\"\"}]}" > desci-server/src/desci-contracts-config/unknown-dpid.json
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
- name: Set up Sentry CLI
run: |
Expand All @@ -65,9 +75,19 @@ jobs:
echo -e "\nSENTRY_AUTH_TOKEN=$SENTRY_AUTH" >> desci-server/.env
cd desci-server && yarn build
- name: Set up sync server
run: |
cd sync-server && yarn --ignore-engines && ./scripts/build.sh test
if [ $? -ne 0 ]; then
exit 1
fi
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
- name: Run tests
run: |
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
cd desci-server && export DOCKER_BUILDKIT=1 && yarn --ignore-engines && yarn test
if [ $? -ne 0 ]; then
exit 1
fi
echo "DISK USE:"; find / -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \; 2>/dev/null
48 changes: 48 additions & 0 deletions .github/workflows/deploy-sync-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy Worker
on:
pull_request:
paths:
- .github/workflows/deploy-sync-server.yaml
- sync-server/**
branches: # array of glob patterns matching against refs/heads. Optional; defaults to all
- main # triggers on pushes that contain changes
- develop

jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
# - name: Show github ref
# run: |
# echo ${{ github.ref }}
# echo ${{ github.ref_name }}
# echo ${{ github.head_ref }}
# - name: Build & Deploy Worker (Dev)
# if: github.head_ref == 'tay/automerge-party-flagged'
# uses: cloudflare/wrangler-action@v3
# with:
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# environment: staging
# workingDirectory: sync-server
# wranglerVersion: 3.95.0
- name: Build & Deploy Worker (Staging)
if: github.ref == 'refs/heads/develop'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
environment: staging
workingDirectory: sync-server
wranglerVersion: 3.95.0
- name: Build & Deploy Worker (Production)
if: github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
environment: production
workingDirectory: sync-server
wranglerVersion: 3.95.0
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ ipfs-data/
local-data/
**/node_modules
.idea
**/*.iml
.composedbRuntimeDefinition.json
openalex-importer
sync-server
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.8.1
20.18.1
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,14 @@
},
"[sql]": {
"editor.defaultFormatter": "ms-mssql.mssql"
},
"[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM node:20.8.1-bullseye-slim
FROM node:20.18.1-bullseye-slim

VOLUME /root/.yarn

RUN apt-get -qy update && apt-get -qy install openssl curl

RUN npm install -g npm@9.8.1
RUN apt-get -qy update && apt-get -qy install openssl curl socat jq

RUN mkdir /app
RUN chown -R node:node /app
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ build: .env desci-contracts/.env
$(MAKE) -C desci-contracts build
$(MAKE) -C desci-server install
$(MAKE) -C desci-repo install
$(MAKE) -C sync-server install
$(MAKE) -C nodes-lib build

.PHONY: sterile
sterile: clean-rec
Expand Down
Loading

0 comments on commit d26fb61

Please sign in to comment.