44 lines
1015 B
YAML
44 lines
1015 B
YAML
name: Tests
|
|
|
|
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-${{ env.NIM_VERSION }}
|
|
|
|
- name: Cache nimble
|
|
id: cache-nimble
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.nimble
|
|
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
|