Skip to content

Commit

Permalink
run binary tests in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Jun 16, 2024
1 parent 19bb6d3 commit 21b73b6
Showing 1 changed file with 115 additions and 1 deletion.
116 changes: 115 additions & 1 deletion .github/workflows/jetbrains-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,120 @@ jobs:
name: ${{ steps.artifact.outputs.filename }}
path: ./extensions/intellij/build/distributions/content/*/*

# Upload binaries as artifacts
- name: Upload artifact (darwin-arm64)
uses: actions/upload-artifact@v4
with:
name: continue-binary-darwin-arm64
path: ./binary/bin/darwin-arm64/continue-binary

- name: Upload artifact (darwin-x64)
uses: actions/upload-artifact@v4
with:
name: continue-binary-darwin-x64
path: ./binary/bin/darwin-x64/continue-binary

- name: Upload artifact (win32-x64)
uses: actions/upload-artifact@v4
with:
name: continue-binary-win32-x64
path: ./binary/bin/win32-x64/continue-binary.exe

- name: Upload artifact (linux-arm64)
uses: actions/upload-artifact@v4
with:
name: continue-binary-linux-arm64
path: ./binary/bin/linux-arm64/continue-binary

- name: Upload artifact (linux-x64)
uses: actions/upload-artifact@v4
with:
name: continue-binary-linux-x64
path: ./binary/bin/linux-x64/continue-binary

test-binaries:
strategy:
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
- os: windows-latest
platform: win32
arch: arm64
npm_config_arch: arm
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
- os: ubuntu-latest
platform: linux
arch: arm64
npm_config_arch: arm64
- os: ubuntu-latest
platform: linux
arch: armhf
npm_config_arch: arm
- os: ubuntu-latest
platform: alpine
arch: x64
npm_config_arch: x64
- os: macos-12 # should migrate this to the newer x64 version of macos-14
platform: darwin
arch: x64
npm_config_arch: x64
- os: macos-12 # same here, especially
platform: darwin
arch: arm64
npm_config_arch: arm64
runs-on: ${{ matrix.os }}
steps:
# 1. Check-out repository
- name: Check-out repository
uses: actions/checkout@v4

# 2. Install npm dependencies
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Cache core node_modules
uses: actions/cache@v3
with:
path: core/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }}

- name: Cache binary node_modules
uses: actions/cache@v3
with:
path: binary/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }}

- name: Install Core Dependencies
run: |
cd ../../core
npm ci
- name: Install Binary Dependencies
run: |
cd ../../binary
npm ci
# Download the binary artifact
- name: Download binary artifact
uses: actions/download-artifact@v4
with:
name: continue-binary-${{ matrix.platform }}-${{ matrix.arch }}
path: ./binary/bin/${{ matrix.platform }}-${{ matrix.arch }}

# Run tests for binary
- name: Run binary tests
run: |
cd ../../binary
npm run test
# Run tests and upload a code coverage report
test:
name: Test
Expand Down Expand Up @@ -266,7 +380,7 @@ jobs:
releaseDraft:
name: Release draft
if: github.event_name != 'pull_request'
needs: [build, test, inspectCode, verify]
needs: [build, test, test-binaries, inspectCode, verify]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down

0 comments on commit 21b73b6

Please sign in to comment.