diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 00000000..d2e33ffe --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + ## make sure this corresponds with the version in release.yml + node-version: latest + + + - run: yarn install --immutable --immutable-cache --check-cache + + - name: Package extension + run: npx vsce package + - name: Upload extension vsix to workflow artifacts + uses: actions/upload-artifact@v3 + with: + name: haskell-${{ github.sha }}.vsix + path: haskell-*.vsix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9a1fb7e..46f0950a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - ghc: [8.10.7, 9.0.2, 9.2.8, 9.4.7, 9.6.2] + os: [macos-12, ubuntu-latest, windows-latest] + ghc: [8.10.7, 9.4.8, 9.6.4, 9.8.2] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -28,6 +28,11 @@ jobs: - run: yarn install --immutable --immutable-cache --check-cache - run: yarn run webpack + # Setup toolchains, install ghcup, install ghc, etc... + - name: Setup Haskell + uses: haskell-actions/setup@v2 + with: + ghc-version: ${{ matrix.ghc }} - name: Toolchain settings run: | ghcup upgrade -i -f @@ -37,9 +42,12 @@ jobs: ghcup install stack latest ghcup install cabal latest - ghcup install ghc ${{matrix.ghc}} - ghcup set ghc ${{matrix.ghc}} + ghcup install ghc ${{ matrix.ghc }} + ghcup set ghc ${{ matrix.ghc }} + # This is a prefetched, fallback HLS version. + # We want to make sure, we still support old GHC versions + # and graciously fallback to an HLS version that supports the old GHC version, such as 8.10.7 ghcup install hls 2.2.0.0 ghcup install hls latest shell: bash @@ -76,13 +84,3 @@ jobs: rm -rf test-workspace rm -rf out shell: bash - - - name: Package tested extension - if: runner.os == 'Linux' - run: npx vsce package - - name: Upload extension vsix to workflow artifacts - if: runner.os == 'Linux' - uses: actions/upload-artifact@v3 - with: - name: haskell-${{ github.sha }}.vsix - path: haskell-*.vsix