Skip to content

Commit

Permalink
Merge pull request #178 from BalticAmadeus/PauliusKu-patch-1
Browse files Browse the repository at this point in the history
Create main.yml DO NOT MERGE
  • Loading branch information
eglekaz authored Sep 6, 2024
2 parents 05acab4 + 2799220 commit 73331a7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
12 changes: 6 additions & 6 deletions src/test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ import { DebugManagerMock } from "./DebugManagerMock";
let parserHelper: AblParserHelper;

const extensionDevelopmentPath = path.resolve(__dirname, "../../../");
const functionalTestDir = "resources\\functionalTests";
const functionalTestDir = "resources/functionalTests";
const functionalTestDirs = getDirs(
path.join(extensionDevelopmentPath, functionalTestDir)
);
let functionalTestCases: string[] = [];
functionalTestDirs.forEach((dir) => {
const testsInsideDir = getDirs(
path.join(extensionDevelopmentPath, functionalTestDir + "\\" + dir)
path.join(extensionDevelopmentPath, functionalTestDir + "/" + dir)
);
testsInsideDir.forEach((test) => {
functionalTestCases.push(dir + "\\" + test);
functionalTestCases.push(dir + "/" + test);
});
});

const treeSitterErrorTestDir = "resources\\treeSitterErrorTests";
const treeSitterErrorTestDir = "resources/treeSitterErrorTests";
const treeSitterErrorTestDirs = getDirs(
path.join(extensionDevelopmentPath, treeSitterErrorTestDir)
);
let treeSitterTestCases: string[] = [];
treeSitterErrorTestDirs.forEach((dir) => {
const testsInsideDir = getDirs(
path.join(extensionDevelopmentPath, treeSitterErrorTestDir + "\\" + dir)
path.join(extensionDevelopmentPath, treeSitterErrorTestDir + "/" + dir)
);
testsInsideDir.forEach((test) => {
treeSitterTestCases.push(dir + "\\" + test);
treeSitterTestCases.push(dir + "/" + test);
});
});

Expand Down

0 comments on commit 73331a7

Please sign in to comment.