-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds CI for testing. Will enable easy checking of PRs and making sure install script/choosenim works
- Loading branch information
1 parent
ebcd902
commit d78d740
Showing
1 changed file
with
52 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
nim-tests: | ||
name: Nim tests | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Nim | ||
uses: jiro4989/setup-nim-action@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Can build | ||
run: nimble -y build | ||
|
||
- name: Run tests | ||
run: nimble -y test | ||
|
||
unix-test: | ||
name: Install script test (Unix like) | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run script | ||
run: bash scripts/choosenim-unix-init.sh -y | ||
|
||
- name: Update path | ||
run: echo "~/.nimble/bin" >> $GITHUB_PATH | ||
|
||
- name: Test Nim works | ||
run: nim --version |