Skip to content

Commit

Permalink
fix windows build (test1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop committed May 24, 2024
1 parent e1ad664 commit 2bbac28
Showing 1 changed file with 27 additions and 33 deletions.
60 changes: 27 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,8 @@ jobs:
- name: Build
run: cargo lambda build

test_wasm:
name: Run Tests (WASM)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tailcall-wasm
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown

- name: Install Wasm Pack
run: cargo install wasm-bindgen-cli --vers "0.2.92"

- name: Test WASM
run: cargo test

test_cf:
name: Run Tests (Cloudflare)
name: Run Tests (WASM)
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -92,6 +73,9 @@ jobs:
with:
target: wasm32-unknown-unknown

- name: Build WASM
run: cargo check --lib --target wasm32-unknown-unknown
working-directory: ./tailcall-cloudflare
- name: Install Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -180,6 +164,11 @@ jobs:
with:
target: ${{ matrix.target }}

- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install nasm -y
- name: Run Cargo Test
run: cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info

Expand Down Expand Up @@ -246,7 +235,7 @@ jobs:
# TODO: move to separate file to separate responsibilities
release:
name: Release
needs: [test, draft_release, check_if_build, test_cf, test_wasm]
needs: [test, draft_release, check_if_build, test_cf]
# TODO: put a condition to separate job that other will depend on to remove duplication?
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.check_if_build.outputs.check_if_build == 'true')
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -359,10 +348,6 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install nasm -y

- name: Build
env:
Expand Down Expand Up @@ -493,19 +478,28 @@ jobs:
with:
node-version: 20.11.0
registry-url: https://registry.npmjs.org
- name: Setup .npmrc file to publish to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install dependencies
run: |
cd tailcall-wasm
cd npm
npm install
- name: Run publish script
- name: Run generate-root.js script
env:
APP_VERSION: ${{ needs.draft_release.outputs.create_release_name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
APP_VERSION: ${{needs.draft_release.outputs.create_release_name }}
run: |
cd tailcall-wasm
npm run publish
cd npm
npm run gen-root -- --version ${{ env.APP_VERSION }}
- name: Setup .npmrc file to publish to npm
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc
- name: Publish packages
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: npm/@tailcallhq/tailcall
access: public

env:
APP_VERSION: ${{needs.draft_release.outputs.create_release_name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

build-and-push-image:
env:
Expand Down

1 comment on commit 2bbac28

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 6.64ms 3.27ms 139.18ms 75.59%
Req/Sec 3.82k 140.16 4.46k 87.92%

456469 requests in 30.01s, 2.29GB read

Requests/sec: 15208.65

Transfer/sec: 78.06MB

Please sign in to comment.