Skip to content

Commit 62a0bc6

Browse files
committed
[GitHub] Try and get extension tests running on branch
1 parent 784b2a8 commit 62a0bc6

1 file changed

Lines changed: 56 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
CARGO_TERM_COLOR: always
1313

1414
jobs:
15-
build-and-test:
15+
lib-build-and-test:
1616
name: Build & Test
1717
runs-on: ${{ matrix.os }}
1818
timeout-minutes: 30
@@ -56,10 +56,64 @@ jobs:
5656
run: cargo build --verbose
5757
- name: Run tests
5858
run: cargo test --verbose
59+
60+
- name: Build release binary for extension tests (macOS ARM64 only)
61+
if: matrix.target == 'aarch64-apple-darwin'
62+
run: cargo build --release --target ${{ matrix.target }}
63+
64+
- name: Upload release binary for extension tests (macOS ARM64 only)
65+
if: matrix.target == 'aarch64-apple-darwin'
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: log2src-test-binary
69+
path: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
70+
if-no-files-found: error
71+
72+
vscode-extension-test:
73+
name: Test VS Code Extension
74+
needs: [lib-build-and-test]
75+
runs-on: macos-latest
76+
timeout-minutes: 15
77+
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@v4
81+
82+
- name: Download log2src binary
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: log2src-test-binary
86+
path: downloaded-binary
87+
88+
- name: Setup binary for VS Code extension
89+
run: |
90+
mkdir -p editors/code/bin/darwin-arm64
91+
cp downloaded-binary/log2src editors/code/bin/darwin-arm64/
92+
chmod +x editors/code/bin/darwin-arm64/log2src
93+
94+
- name: Install pnpm
95+
uses: pnpm/action-setup@v4
96+
with:
97+
version: 10.8.0
98+
99+
- name: Setup Node.js
100+
uses: actions/setup-node@v4
101+
with:
102+
node-version: '20'
103+
cache: 'pnpm'
104+
cache-dependency-path: 'editors/code/pnpm-lock.yaml'
105+
106+
- name: Install Dependencies
107+
working-directory: editors/code
108+
run: pnpm install
109+
110+
- name: Run tests
111+
working-directory: editors/code
112+
run: pnpm run test
59113

60114
build-release:
61115
name: Build Release
62-
needs: [build-and-test]
116+
needs: [lib-build-and-test]
63117
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
64118
runs-on: ${{ matrix.os }}
65119
timeout-minutes: 30

0 commit comments

Comments
 (0)