Update test workflow
This commit is contained in:
26
.github/workflows/test.yml
vendored
26
.github/workflows/test.yml
vendored
@@ -4,22 +4,40 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
NIM_VERSION: 1.0.2
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
run: echo "::set-env name=NIM_VERSION::$NIM_VERSION"
|
||||
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Cache choosenim
|
||||
id: cache-choosenim
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.choosenim
|
||||
key: ${{ runner.os }}-choosenim-stable
|
||||
key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }}
|
||||
|
||||
- name: Cache nimble
|
||||
id: cache-nimble
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.nimble
|
||||
key: ${{ runner.os }}-nimble-stable
|
||||
- uses: jiro4989/setup-nim-action@v1.0.1
|
||||
- run: nimble test -Y
|
||||
key: ${{ runner.os }}-nimble-${{ env.NIM_VERSION }}
|
||||
|
||||
- name: Install Nim
|
||||
if: steps.cache-choosenim.outputs.cache-hit != 'true' || steps.cache-nimble.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
export CHOOSENIM_CHOOSE_VERSION="$NIM_VERSION"
|
||||
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
|
||||
sh init.sh -y
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
export PATH=$HOME/.nimble/bin:$PATH
|
||||
echo $PATH
|
||||
nimble test
|
||||
|
||||
Reference in New Issue
Block a user