Skip to content

Commit

Permalink
setup runtime test
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Jul 4, 2024
1 parent 81f069f commit a240f37
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 250 deletions.
53 changes: 17 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,71 +46,52 @@ jobs:
- name: Build
run: cargo build --release

- id: run
- name: export BINARY_SIZE
run: |
BINARY_SIZE=$(ls -l ./target/release/transform-ci | awk '{print $5}')
BINARY_SIZE=$(ls -l ./target/release/monitor_oxc | awk '{print $5}')
echo "BINARY_SIZE=$BINARY_SIZE" >> $GITHUB_OUTPUT
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: transform-ci
path: ./target/release/transform-ci

checkout:
name: Read repos.json
needs: build
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setmatrix.outputs.content }}
steps:
- uses: taiki-e/checkout-action@v1
- id: setmatrix
uses: jaywcjlove/github-action-read-file@main
with:
localfile: ./matrix.json
name: monitor-oxc
path: ./target/release/monitor-oxc

test:
needs: checkout
needs: build
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.checkout.outputs.matrix) }}
name: ${{ matrix.repository }}
steps:
- name: Clone ${{ matrix.repository }}
uses: actions/checkout@v4
with:
repository: ${{ matrix.repository }}
ref: ${{ matrix.ref }}
- name: Checkout Repository
uses: taiki-e/checkout-action@v1

- name: Download Transform Binary
- name: Download Binary
uses: actions/download-artifact@v4
with:
name: transform-ci

- name: chmod +x transform-ci
run: chmod +x ./transform-ci
name: monitor-oxc

- name: Transform
run: ./transform-ci ${{ matrix.transform_directories }}
- name: chmod +x monitor-oxc
run: chmod +x ./monitor-oxc

- name: Install pnpm
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm

- name: Install packages
run: pnpm install

- name: Check
run: ${{ matrix.command }}
- name: Run
run: ./monitor-oxc

- name: Test
run: pnpm run test

compile-time:
name: Compile Time
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.14.0
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@jsr:registry=https://npm.jsr.io
106 changes: 8 additions & 98 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "transform-ci"
name = "monitor-oxc"
version = "0.0.0"
edition = "2021"
publish = false

[dependencies]
oxc = { path = "../oxc/crates/oxc", features = ["transformer", "codegen"] }
ignore = "0.4.22"
walkdir = "2.5.0"

[profile.release]
opt-level = 3
Expand Down
8 changes: 0 additions & 8 deletions matrix.json

This file was deleted.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "transform-ci",
"name": "monitor-oxc",
"private": true,
"scripts": {
"tsc": "tsc"
"add": "jsr add -D",
"test": "node src/main.test.mjs"
},
"devDependencies": {
"typescript": "^5.4.5"
}
"@luca/cases": "npm:@jsr/luca__cases@^1.0.0",
"jsr": "^0.12.4",
"@hono/hono": "npm:@jsr/[email protected]"
},
"packageManager": "[email protected]"
}
60 changes: 51 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a240f37

Please sign in to comment.