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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
env:
|
||||||
|
NIM_VERSION: 1.0.2
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup environment
|
||||||
|
run: echo "::set-env name=NIM_VERSION::$NIM_VERSION"
|
||||||
|
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Cache choosenim
|
- name: Cache choosenim
|
||||||
id: cache-choosenim
|
id: cache-choosenim
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.choosenim
|
path: ~/.choosenim
|
||||||
key: ${{ runner.os }}-choosenim-stable
|
key: ${{ runner.os }}-choosenim-${{ env.NIM_VERSION }}
|
||||||
|
|
||||||
- name: Cache nimble
|
- name: Cache nimble
|
||||||
id: cache-nimble
|
id: cache-nimble
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.nimble
|
path: ~/.nimble
|
||||||
key: ${{ runner.os }}-nimble-stable
|
key: ${{ runner.os }}-nimble-${{ env.NIM_VERSION }}
|
||||||
- uses: jiro4989/setup-nim-action@v1.0.1
|
|
||||||
- run: nimble test -Y
|
- 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