Update test workflow

This commit is contained in:
2019-11-20 22:01:30 +01:00
parent a8599ad72d
commit db82fe0eee

View File

@@ -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