Skip to content

Commit

Permalink
Run only corpus tests on MacOS in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Jul 24, 2024
1 parent 7c585b0 commit 4169e77
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1,081 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ on:

jobs:
test:
name: test / ${{matrix.os}}
runs-on: ${{matrix.os}}
name: Full tests
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || github.event.action != 'closed'
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Run tests
run: nix -L run .#ci

test-mac:
name: MacOS tests
runs-on: macos-latest
if: github.event.pull_request.merged == true || github.event.action != 'closed'
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/setup-action/cli@v1
- run: tree-sitter generate
- uses: tree-sitter/parser-test-action@v2
8 changes: 8 additions & 0 deletions nix/outputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@
export EM_CACHE="''${TREE_SITTER_LIBDIR}/.emscriptencache"
'';

initConfig = ''
if [[ ! -f ''${XDG_CONFIG_HOME}/tree-sitter/config.json ]]
then
tree-sitter init-config
fi
'';

shell = pkgs.mkShell {
name = "tree-sitter-haskell";
packages = [
Expand Down Expand Up @@ -326,6 +333,7 @@
];
text = ''
${setup}
${initConfig}
npm install
${tests}
'';
Expand Down
Loading

0 comments on commit 4169e77

Please sign in to comment.