Merge pull request #757 from desci-labs/disable-paging #1611
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build.yml | |
on: | |
# pull_request: | |
# paths: | |
# - desci-server/** | |
push: | |
paths: | |
- .github/workflows/** | |
- desci-server/** | |
- desci-repo/** | |
- desci-contracts/** | |
- sync-server/** | |
- Dockerfile | |
name: Test desci-server | |
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html | |
env: | |
AWS_DEFAULT_REGION: us-east-2 | |
AWS_DEFAULT_OUTPUT: json | |
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CONTAINER_IMAGE: desci-server | |
DOCKER_BUILDKIT: 1 | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-22.04 | |
# container: | |
# image: ubuntu:latest | |
# 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 | |
- name: Set up the environment | |
# Replace this line with the appropriate setup for your project | |
# Examples: | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
check-latest: false | |
cache: "yarn" | |
cache-dependency-path: | | |
desci-models/yarn.lock | |
desci-server/yarn.lock | |
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 | |
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: | | |
npm install -g @sentry/cli | |
sentry-cli --version | |
sentry-cli login --auth-token $SENTRY_AUTH_TOKEN | |
# append to .env | |
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 |