diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 686cdd5..5c45c0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,11 @@ on: jobs: test: name: Test - runs-on: ubuntu-latest strategy: matrix: node-version: [14.x, 16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} env: HUSKY: 0 steps: @@ -28,7 +29,15 @@ jobs: node-version: ${{ matrix.node-version }} - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + echo "dir=$(yarn cache dir)" >> $env:GITHUB_OUTPUT + else + echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + fi + - name: Debug + run: | + echo "${{ steps.yarn-cache-dir-path.outputs.dir }}" - name: Restore yarn cache uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)