-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub Actions CI for testing #504
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a13dcdf
Add GitHub workflow for testing
lukel97 3b323fa
Add HLS_TEST_EXE env var to control which exe to test
lukel97 c17c379
Pass -j1 flag to tasty when running tests on GitHub
lukel97 9a008ef
Enable stack in GitHub CI
lukel97 7dd31a4
Update cabal
lukel97 6e35e07
Add HLS_WRAPPER_TEST_EXE
lukel97 d83e651
Fix cache restore keys
lukel97 5369244
Try force language server to use utf8 locale
lukel97 85ab899
Use patched hie-bios
lukel97 8f8e9e1
Remove debug print
lukel97 0c5cc85
Lets find out what the windows locale encoding is
lukel97 f917430
Give up trying to fix the locale
lukel97 9328aa6
Add comment for -j1
lukel97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ defaults: | |
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
|
||
build: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Testing | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc: ['8.10.2', '8.10.1', '8.8.4', '8.8.3', '8.8.2', '8.6.5', '8.6.4'] | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
exclude: | ||
- os: windows-latest | ||
ghc: '8.10.2' # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550 | ||
- os: windows-latest | ||
ghc: '8.8.4' # also fails due to segfault :( | ||
- os: windows-latest | ||
ghc: '8.8.3' # fails due to segfault | ||
- os: windows-latest | ||
ghc: '8.8.2' # fails due to error with Cabal | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-haskell@v1 | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: '3.2' | ||
enable-stack: true | ||
|
||
- name: Cache Cabal | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-cabal | ||
with: | ||
path: ~/.cabal/ | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-${{ matrix.ghc }}-build- | ||
${{ runner.os }}-${{ matrix.ghc }} | ||
|
||
- run: cabal update | ||
|
||
# Need this to work around filepath length limits in Windows | ||
- name: Shorten binary names | ||
shell: bash | ||
run: | | ||
sed -i.bak -e 's/haskell-language-server/hls/g' \ | ||
-e 's/haskell_language_server/hls/g' \ | ||
haskell-language-server.cabal | ||
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ | ||
src/**/*.hs exe/*.hs | ||
|
||
- name: Build | ||
run: cabal build | ||
- name: Test | ||
env: | ||
HLS_TEST_EXE: hls | ||
HLS_WRAPPER_TEST_EXE: hls-wrapper | ||
# run the tests without parallelism, otherwise tasty will attempt to run | ||
# all functional test cases simultaneously which causes way too many hls | ||
# instances to be spun up for the poor github actions runner to handle | ||
run: cabal test --test-options=-j1 | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you add
-j1
due a concrete issue?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of precaution, the tests previously failed on circleci because without -j1 tasty attempts to run all the functional tests in parallel, which means it spins up 20 or so hls instances simultaneously. I'm not sure if the GitHub runners can handle it or not but the circleCI runners definitely couldn't!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it worths a comment?