Skip to content

Commit

Permalink
Test main in CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
noisekit committed Aug 15, 2023
1 parent 7c5d009 commit 4072847
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
version: 2.1

parameters:
node-version:
type: string
default: "18.17.1"

commands:
yarn-install:
steps:
- run: yarn install --immutable --immutable-cache

install-foundry:
steps:
- run:
name: "Install foundry used for cannon and e2e tests"
environment:
SHELL: /bin/bash
command: |-
apt update && apt install --yes curl
curl -L https://foundry.paradigm.xyz | bash
export PATH="$PATH:$HOME/.foundry/bin"
echo export PATH="$PATH:$HOME/.foundry/bin" > $BASH_ENV
foundryup
install-ipfs:
steps:
- run:
name: "Install IPFS"
command: |
LATEST_VERSION=$(curl -sSL https://dist.ipfs.tech/go-ipfs/versions | tail -n 1)
LATEST_VERSION_NUMBER=${LATEST_VERSION#*v}
DOWNLOAD_URL="https://dist.ipfs.tech/go-ipfs/${LATEST_VERSION}/go-ipfs_${LATEST_VERSION}_linux-amd64.tar.gz"
echo "DOWNLOAD_URL=$DOWNLOAD_URL"
curl -sSL -o ipfs.tar.gz $DOWNLOAD_URL
tar -xzf ipfs.tar.gz
sudo cp -f ./go-ipfs/ipfs /usr/local/bin/
ipfs init
run-ipfs-daemon:
steps:
- run:
command: ipfs daemon
background: true

wait-for-ipfs:
steps:
- run:
name: "Wait for IPFS daemon to start"
command: wget --retry-connrefused --waitretry=20 --read-timeout=20 --timeout=15 -t 10 --post-data '' "http://localhost:5001/api/v0/version"

jobs:
test:
parameters:
workspace:
type: string
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
# resource_class: large
environment:
NODE_ENV: test
steps:
- checkout
- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install

- run: yarn workspaces foreach --topological-dev --recursive --verbose --from "<< parameters.workspace >>" run build:ts

- run: yarn workspaces foreach --topological-dev --recursive --verbose --from "<< parameters.workspace >>" run build-testable

workflows:
version: 2.1

ui:
jobs:
- test:
name: "test-main"
workspace: "@synthetixio/main"

0 comments on commit 4072847

Please sign in to comment.