Remove os_test #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_call: | |
outputs: | |
version: | |
value: ${{ jobs.build_prod.outputs.version }} | |
jobs: | |
stack_test: | |
strategy: | |
matrix: | |
stack_yaml: | |
- stack-ghc-9.6.yaml | |
- stack-ghc-9.8.yaml | |
# technically redundant, since this should be a symlink, | |
# but just to be extra sure | |
- stack.yaml | |
name: 'stack_test: ${{ matrix.stack_yaml }}' | |
runs-on: ubuntu-22.04 | |
env: | |
STACK_YAML: ${{ matrix.stack_yaml }} | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-stack_test-${{ matrix.stack_yaml }}-${{ hashFiles(matrix.stack_yaml, 'nvim-hs.cabal') }} | |
- run: stack test --test-arguments="--format=checks" | |
- name: Check that Cabal file was generated | |
run: git diff --exit-code '*.cabal' | |
cabal_test: | |
strategy: | |
matrix: | |
ghc_version: | |
- '9.6' | |
- '9.8' | |
- '9.10' | |
name: 'cabal_test: ghc-${{ matrix.ghc_version }}' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: ConorMacBride/[email protected] | |
with: | |
apt: neovim # for api generation | |
- uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc_version }} | |
- run: cabal update | |
- run: cabal freeze | |
- run: echo "CURR_MONTH=$(date +%B)" | tee -a "$GITHUB_ENV" | |
- uses: actions/[email protected] | |
with: | |
path: ~/.cabal/store | |
key: ${{ runner.os }}-cabal-cache-${{ env.CURR_MONTH }}-${{ matrix.ghc_version }}-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: | | |
${{ runner.os }}-cabal-cache-${{ env.CURR_MONTH }}-${{ matrix.ghc_version }}- | |
- run: cabal install --overwrite-policy=always hspec-discover | |
- run: cabal test --test-show-details=streaming --test-options="--format=checks" | |
build_haddock: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-build_haddock-${{ hashFiles('stack.yaml', 'nvim-hs.cabal') }} | |
- name: Build haddock | |
# just a sanity check, so no need to build third-party docs | |
run: stack haddock --fast --no-haddock-deps | |
- name: Bundle haddock docs | |
run: tar czf nvim-hs-docs.tar.gz -C "$(find .stack-work/dist -regex '.*/doc/html/[^/]*')" . | |
- uses: actions/[email protected] | |
with: | |
name: nvim-hs-docs | |
path: nvim-hs-docs.tar.gz | |
check_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-check_sdist-${{ hashFiles('stack.yaml') }} | |
- name: Create sdist bundle | |
run: stack sdist --test-tarball --tar-dir . | |
- uses: actions/[email protected] | |
with: | |
name: nvim-hs-sdist | |
path: nvim-hs-*.tar.gz | |