Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
3cebaa1
feat(nx-cloud): setup nx cloud workspace
bunsenstraat Oct 18, 2025
56c55af
feat: integrate NX Cloud with CircleCI
Oct 18, 2025
2d841fb
fix: upgrade Node.js to 20.19.0 in CircleCI
Oct 18, 2025
57e5231
fix: use existing build commands with NX Cloud caching
Oct 18, 2025
1995ea2
rm persistance
Oct 18, 2025
5cf0c05
fix: Use runtime config instead of compile-time env vars for compiler…
Oct 18, 2025
be3ae14
refactor: Remove unsupported env var inputs from project.json
Oct 18, 2025
92d66bf
feat: Add GitHub Actions workflows for build caching and on-demand E2…
Oct 18, 2025
e35ffd2
debug: Enable NX_VERBOSE_LOGGING to diagnose cache issues
Oct 18, 2025
1462c75
temp: Add push trigger to register E2E workflow
Oct 18, 2025
50f78f6
filter
Oct 18, 2025
f68bc27
ten jobs
Oct 18, 2025
5afaba0
another attempt at simpe
Oct 18, 2025
ec838d3
again
Oct 18, 2025
ff6ad23
services
Oct 18, 2025
82bb5ba
try again
Oct 18, 2025
8b7440f
cache
Oct 18, 2025
e8c8d7c
old approach
Oct 18, 2025
9050c9b
retry
Oct 18, 2025
5daab3e
innject
Oct 18, 2025
f3bf840
cache script
Oct 18, 2025
4751161
20
Oct 18, 2025
4dbcfb1
dont persist
Oct 18, 2025
2694601
reduce verbose logging
Oct 18, 2025
0c464b3
hide output
Oct 18, 2025
3c73d3f
debug nx
Oct 18, 2025
eef6f1d
no retry
Oct 18, 2025
da6bab9
feat(nx-cloud): setup nx cloud workspace
bunsenstraat Oct 18, 2025
1b5dcaf
ci change
Oct 18, 2025
7038151
Merge branch 'feat/nx-cloud/setup' of https://github.com/remix-projec…
Oct 18, 2025
face1bf
force token
Oct 18, 2025
2d0eb7b
chore(ci): hoist app deps to root so CI root install satisfies apps; …
Oct 18, 2025
79680ad
deps
Oct 18, 2025
b73bd71
ci(nx-cloud): persist NX_CLOUD_ACCESS_TOKEN correctly via (fix quoti…
Oct 18, 2025
20df021
update yml
Oct 18, 2025
a41bfe9
token
Oct 18, 2025
5b210d1
simple
Oct 19, 2025
04bd7ff
nvm
Oct 19, 2025
adb3d3a
buikd
Oct 19, 2025
79a63a3
rm monaco
Oct 19, 2025
dc81a41
random change
Oct 19, 2025
fc53b7f
another change
Oct 19, 2025
73093d1
set to small
Oct 19, 2025
0507e09
rm e2e install
Oct 19, 2025
e64c5c9
optimize
Oct 19, 2025
47cd05d
error fix
Oct 19, 2025
46601c0
rm github script
Oct 19, 2025
3533a22
rm hardhat
Oct 19, 2025
796d814
lint
Oct 19, 2025
da84c7f
lint
Oct 19, 2025
027c941
chrome install
Oct 19, 2025
94e028e
deploy builds
Oct 19, 2025
3fc38f3
chore: revert lockfile and root package.json to master to avoid depen…
Oct 19, 2025
8f8cd82
revert
Oct 19, 2025
4bff2c5
medium+
Oct 19, 2025
ebb265b
sa test
Oct 19, 2025
e81ec32
screenshot
Oct 19, 2025
3cc4a85
fix test
Oct 19, 2025
b76f348
slither install
Oct 19, 2025
bc4556d
back to persist
Oct 19, 2025
d668f5f
new split
Oct 19, 2025
0df4981
disable remixd test
Oct 19, 2025
03a5e1f
fix python
Oct 19, 2025
1c557aa
run without pythone
Oct 19, 2025
cf5a59a
set to 20
Oct 19, 2025
e29e7a0
timing script
Oct 20, 2025
38b0fc8
self splitting
Oct 20, 2025
8eab1bf
plan shards
Oct 21, 2025
9249990
config
Oct 21, 2025
4c7585f
more stats
Oct 21, 2025
cde2101
no injnect
Oct 21, 2025
e6932bb
new calc
Oct 21, 2025
c2fec9a
no retry
Oct 21, 2025
b935562
vertical
Oct 21, 2025
d999310
vertical runs
Oct 21, 2025
87316d2
small
Oct 21, 2025
5e2c204
failed test run
Oct 21, 2025
db91858
build first
Oct 21, 2025
887142b
use build job
Oct 21, 2025
a1c36ad
5 runs back
Oct 21, 2025
6daf6d6
add param
Oct 21, 2025
b28b57e
enum
Oct 21, 2025
cbab6d3
perms
Oct 21, 2025
ed756ef
failed tasks script
Oct 22, 2025
9d25fef
test reports
Oct 22, 2025
d56620e
fix report
Oct 22, 2025
17bff5c
token rename
Oct 22, 2025
3ae95f8
wait for jobs
Oct 22, 2025
0c2aadd
use bot for comments
Oct 22, 2025
35efd25
md script
Oct 22, 2025
002393f
NODE_PATH
Oct 23, 2025
e80939f
file test
Oct 23, 2025
06da1ac
lock file
Oct 23, 2025
7eb49d1
sort
Oct 23, 2025
3267d26
reporter
Oct 23, 2025
95002b7
make mistake
Oct 23, 2025
86b5739
pem key
Oct 23, 2025
fe1c581
Add debug logging to post-pr-report for auth method detection
Oct 23, 2025
6241da2
rerun
Oct 23, 2025
2e9966b
logging
Oct 23, 2025
fc67dc5
fallback
Oct 23, 2025
85e8256
fix rerun
Oct 23, 2025
1858879
reurn
Oct 24, 2025
98e70c1
rerun
Oct 24, 2025
d132548
rerun
Oct 24, 2025
b4ed8b8
fix script
Oct 24, 2025
d54963a
more fix
Oct 24, 2025
3189415
fix reports
Oct 24, 2025
c332ee1
do it again
Oct 24, 2025
6b0db56
Delete pembot.txt
bunsenstraat Oct 24, 2025
8835b14
fix build
Oct 25, 2025
2e2d91c
fallback
Oct 25, 2025
c55d93f
restore stuff
Oct 25, 2025
994f324
add libs to build tar
Oct 25, 2025
62cdaeb
pip3
Oct 25, 2025
06565c8
chore(ci): remove unused Travis scripts and duplicate browser_tests.s…
Oct 25, 2025
140d8d9
rm travis ref
Oct 25, 2025
36f0f8b
ci(e2e): add setup_slither_if_needed.sh helper and invoke it across a…
Oct 25, 2025
34e824c
chore(ci): fix CI directory permissions and mark all CI scripts execu…
Oct 25, 2025
8a85007
order tasks
Oct 25, 2025
f6fb21b
revert: restore eslint config files to master state (unrelated to PR …
Oct 25, 2025
d6b15d0
libs test
Oct 25, 2025
8a77f54
runs libs medium
Oct 25, 2025
506d889
fallback
Oct 25, 2025
5725363
Merge remote-tracking branch 'origin/master' into feat/nx-cloud/setup
Oct 25, 2025
e06f339
fixes
Oct 25, 2025
a76c583
add runtime report
Oct 25, 2025
68cd4f0
config
Oct 25, 2025
7dfa504
fix enum
Oct 25, 2025
000c847
config
Oct 25, 2025
1cca109
test again
Oct 25, 2025
55e9392
fixed
Oct 25, 2025
772c225
reset app
Oct 25, 2025
3376db6
mv script
Oct 26, 2025
864d639
Merge branch 'master' into feat/nx-cloud/setup
bunsenstraat Oct 28, 2025
f08a566
Merge branch 'master' into feat/nx-cloud/setup
bunsenstraat Oct 28, 2025
bed590f
get started sticky
bunsenstraat Oct 28, 2025
f240438
fix
bunsenstraat Oct 28, 2025
71970ae
fix
bunsenstraat Oct 28, 2025
7a14547
add started
bunsenstraat Oct 28, 2025
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
128 changes: 71 additions & 57 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# NX Cloud Configuration:
# - NX_CLOUD_ACCESS_TOKEN environment variable must be set in CircleCI project settings
# - NX Cloud provides remote caching for all nx commands (build, build:libs, etc)
# - Caching happens automatically - no code changes needed
# - View analytics and cache hits at https://nx.app
version: 2.1
parameters:
run_all_tests:
Expand Down Expand Up @@ -36,12 +41,12 @@ jobs:

build:
docker:
- image: cimg/node:20.0.0-browsers
- image: cimg/node:20.19.0-browsers
resource_class: << pipeline.parameters.resource_class >>
working_directory: ~/remix-project
steps:
- run: sudo apt update && sudo apt install zstd
- checkout
- run: git fetch origin master:master || true
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
Expand All @@ -51,34 +56,18 @@ jobs:
paths:
- node_modules
- run:
name: Build
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
NX_BIN_URL=http://127.0.0.1:8080/assets/js/soljson NX_WASM_URL=http://127.0.0.1:8080/assets/js/soljson NX_NPM_URL=http://127.0.0.1:9090/ yarn build:production
else
NX_BIN_URL=http://127.0.0.1:8080/assets/js/soljson NX_WASM_URL=http://127.0.0.1:8080/assets/js/soljson NX_NPM_URL=http://127.0.0.1:9090/ yarn build
fi
name: Build for tests
command: yarn build
environment:
NX_VERBOSE_LOGGING: true
- run:
name: Inject E2E test configuration
command: yarn inject-e2e-config
- run: yarn run build:e2e

- run: grep -ir "[0-9]+commit" apps/* libs/* --include \*.ts --include \*.tsx --include \*.json > soljson-versions.txt
- restore_cache:
keys:
- soljson-v7-{{ checksum "soljson-versions.txt" }}
- run: yarn run downloadsolc_assets_e2e
- save_cache:
key: soljson-v7-{{ checksum "soljson-versions.txt" }}
paths:
- dist/apps/remix-ide/assets/js/soljson

- run: mkdir persist && tar -cf - dist | zstd -1 -o persist/dist.tar.zst
- persist_to_workspace:
root: .
paths:
- "persist"

build-plugin:
docker:
- image: cimg/node:20.0.0-browsers
- image: cimg/node:20.19.0-browsers
resource_class: << pipeline.parameters.resource_class >>
working_directory: ~/remix-project
parameters:
Expand All @@ -94,15 +83,11 @@ jobs:
key: v1-deps-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run: yarn nx build << parameters.plugin >> --configuration=production
- run: mkdir persist && zip -0 -r persist/plugin-<< parameters.plugin >>.zip dist
- persist_to_workspace:
root: .
paths:
- "persist"
- run: yarn nx build << parameters.plugin >> --configuration=production

lint:
docker:
- image: cimg/node:20.0.0-browsers
- image: cimg/node:20.19.0-browsers
resource_class: << pipeline.parameters.resource_class >>
working_directory: ~/remix-project
steps:
Expand All @@ -117,13 +102,12 @@ jobs:
command: node ./apps/remix-ide/ci/lint-targets.js
remix-libs:
docker:
- image: cimg/node:20.0.0-browsers
- image: cimg/node:20.19.0-browsers
resource_class: << pipeline.parameters.resource_class >>
working_directory: ~/remix-project
steps:
- checkout
- attach_workspace:
at: .
- run: git fetch origin master:master || true
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
Expand Down Expand Up @@ -189,11 +173,33 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- checkout
- attach_workspace:
at: .
- run: sudo apt update && sudo apt install python3-pip -y zstd
- run: zstd -d persist/dist.tar.zst -o persist/dist.tar
- run: tar -xf persist/dist.tar
- run: git fetch origin master:master || true
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- save_cache:
key: v1-deps-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: Build from NX Cloud cache
command: yarn build
environment:
NX_VERBOSE_LOGGING: true
- run:
name: Inject E2E test configuration
command: yarn inject-e2e-config
- run: yarn run build:e2e
- run: grep -ir "[0-9]+commit" apps/* libs/* --include \*.ts --include \*.tsx --include \*.json > soljson-versions.txt
- restore_cache:
keys:
- soljson-v7-{{ checksum "soljson-versions.txt" }}
- run: yarn run downloadsolc_assets_e2e
- save_cache:
key: soljson-v7-{{ checksum "soljson-versions.txt" }}
paths:
- dist/apps/remix-ide/assets/js/soljson
- run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules || yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules
- run: mkdir node_modules/hardhat && wget https://unpkg.com/hardhat/console.sol -O node_modules/hardhat/console.sol
- run: ls -la ./dist/apps/remix-ide/assets/js
Expand Down Expand Up @@ -268,12 +274,19 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- checkout
- attach_workspace:
at: .
- run: sudo apt update && sudo apt install zstd
- run: zstd -d persist/dist.tar.zst -o persist/dist.tar
- run: tar -xf persist/dist.tar
- run: unzip ./persist/plugin-<< parameters.plugin >>.zip
- run: git fetch origin master:master || true
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- save_cache:
key: v1-deps-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: Build from NX Cloud cache
command: yarn build
- run: yarn nx build << parameters.plugin >> --configuration=production
- run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules || yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules
- browser-tools/install-browser-tools:
install-firefox: false
Expand All @@ -291,7 +304,7 @@ jobs:

predeploy:
docker:
- image: cimg/node:20.0.0-browsers
- image: cimg/node:20.19.0-browsers
resource_class: << pipeline.parameters.resource_class >>
working_directory: ~/remix-project
steps:
Expand All @@ -305,15 +318,10 @@ jobs:
paths:
- node_modules
- run: yarn build:production
- run: mkdir persist && zip -0 -r persist/predeploy.zip dist
- persist_to_workspace:
root: .
paths:
- "persist"

deploy-build:
docker:
- image: cimg/node:20.0.0-browsers
- image: cimg/node:20.19.0-browsers

resource_class:
xlarge
Expand All @@ -328,9 +336,15 @@ jobs:

steps:
- checkout
- attach_workspace:
at: .
- run: unzip ./persist/predeploy.zip
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- run: yarn
- save_cache:
key: v1-deps-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run: yarn build:production
- run: ./apps/remix-ide/ci/deploy_from_travis_remix-<< parameters.script >>.sh

workflows:
Expand Down
150 changes: 150 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# GitHub Actions Workflows

This directory contains GitHub Actions workflows for the Remix IDE project.

## Workflows

### 1. Build and Cache (`build-and-cache.yml`)

**Purpose:** Automatically builds the project and caches artifacts to NX Cloud on every push.

**Triggers:**
- Push to `master`, `main`, `develop`, `feat/**`, `fix/**` branches
- Pull requests to `master`, `main`, `develop` branches

**What it does:**
- Checks out the code
- Installs Node.js (version from `.nvmrc`)
- Installs dependencies with Yarn
- Builds all projects using NX
- Uploads build artifacts to NX Cloud cache

**Benefits:**
- Free caching using GitHub Actions runners (public repos)
- Pre-warms the NX Cloud cache for CircleCI jobs
- Fast feedback on build status

---

### 2. E2E Chrome Tests - On Demand (`e2e-chrome-on-demand.yml`)

**Purpose:** Runs end-to-end Chrome browser tests manually when needed.

**Triggers:**
- Manual trigger via GitHub UI (Actions tab → E2E Tests - Chrome → Run workflow)

**Inputs:**
- `test_pattern` (optional): Glob pattern to filter tests
- Example: `dist/apps/remix-ide-e2e/src/tests/*group1*.test.js`
- Leave empty to run all tests

**What it does:**
1. Builds the project from NX Cloud cache
2. Injects E2E test configuration (localhost URLs)
3. Downloads Solidity compiler assets
4. Installs Chrome and ChromeDriver
5. Runs Nightwatch E2E tests
6. Uploads screenshots and reports on failure

**Usage:**
```bash
# Via GitHub CLI
gh workflow run "E2E Tests - Chrome (On Demand)" \
-f test_pattern="dist/apps/remix-ide-e2e/src/tests/*group1*.test.js"

# Or use the GitHub web UI:
# 1. Go to Actions tab
# 2. Click "E2E Tests - Chrome (On Demand)"
# 3. Click "Run workflow"
# 4. Optionally enter a test pattern
# 5. Click "Run workflow"
```

---

## Setup Requirements

### GitHub Secrets

Ensure the following secret is set in your GitHub repository settings:

- `NX_CLOUD_ACCESS_TOKEN`: Your NX Cloud access token
- Get it from: https://nx.app/orgs/your-org/settings
- Or from environment: `echo $NX_CLOUD_ACCESS_TOKEN`
- Set it at: Repository Settings → Secrets and variables → Actions → New repository secret

### .nvmrc File

The workflows use the Node.js version specified in `.nvmrc`. Ensure this file exists:

```bash
cat .nvmrc
# Should output: v20
```

---

## Comparison with CircleCI

| Feature | GitHub Actions | CircleCI |
|---------|---------------|----------|
| **Cost** | Free (public repos) | Paid minutes |
| **Speed** | Standard runners | Configurable resources |
| **Use Case** | Build caching | Full CI/CD pipeline |
| **Triggers** | Push, PR, manual | Push, scheduled |
| **E2E Tests** | On-demand only | Automated on every push |

**Strategy:**
- Use **GitHub Actions** for cheap build caching on every push
- Use **CircleCI** for comprehensive testing and deployment
- Both share the same NX Cloud cache for maximum efficiency

---

## Monitoring

### Build Status

Check workflow runs:
- GitHub UI: Repository → Actions tab
- Badge: Add to README:
```markdown
![Build](https://github.com/remix-project-org/remix-project/actions/workflows/build-and-cache.yml/badge.svg)
```

### NX Cloud Dashboard

View cache hit rates and performance:
- https://nx.app/

---

## Troubleshooting

### Workflow fails with "NX_CLOUD_ACCESS_TOKEN not found"

1. Check if the secret is set in repository settings
2. Verify the secret name matches exactly (case-sensitive)
3. Ensure you have repository admin access to view secrets

### E2E tests fail with "Cannot find ChromeDriver"

The `install_webdriver` script should handle this. If it fails:
1. Check if the script exists: `apps/remix-ide-e2e/install-webdriver.sh`
2. Manually specify ChromeDriver version in the workflow

### Build is not using NX Cloud cache

1. Verify `NX_CLOUD_ACCESS_TOKEN` is set correctly
2. Check NX Cloud dashboard for your organization
3. Ensure `nx.json` has the correct runner configuration

---

## Future Improvements

- [ ] Add workflow for running specific test groups (group1, group2, etc.)
- [ ] Matrix build for multiple Node.js versions
- [ ] Automatic retry on flaky tests
- [ ] Parallel test execution
- [ ] Integration with GitHub Checks API for better PR feedback
Loading
Loading