summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrustable-code <krauter.simon@arcor.de>2020-06-19 14:56:16 +0200
committertrustable-code <krauter.simon@arcor.de>2020-06-19 14:56:16 +0200
commitabb23c61b96d84df3deaf2211a2a9837aed1a5c1 (patch)
treed83fa61bda28bee936c9a267d2acc5661eb8c6bc
parent6b5a397d555ffe4f294531f90cbc9d490fef9a98 (diff)
parent364364515d132ce0827d39cde99c0e3b4b03c21e (diff)
downloadNiGui-abb23c61b96d84df3deaf2211a2a9837aed1a5c1.tar.gz
NiGui-abb23c61b96d84df3deaf2211a2a9837aed1a5c1.zip
Merge branch 'master' of https://github.com/trustable-code/NiGui
-rw-r--r--.github/workflows/test.yml71
-rw-r--r--examples/config.nims1
2 files changed, 72 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..34f4742
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,71 @@
+name: test
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ skip:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo "Skip job"
+
+ before:
+ runs-on: ubuntu-latest
+ if: "! contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - run: echo "not contains '[skip ci]'"
+
+ test:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os:
+ - ubuntu-latest
+ - macOS-latest
+ - windows-latest
+ nim_version:
+ - '1.2.0'
+ - 'stable'
+ needs: before
+ steps:
+ - uses: actions/checkout@v1
+
+ - name: Set cache-key
+ id: vars
+ run: |
+ if [[ ${{ matrix.nim_version }} == stable ]]; then
+ echo ::set-output name=cache-key::$(date +%Y-%m-%d)
+ else
+ echo ::set-output name=cache-key::${{ matrix.nim_version }}
+ fi
+ shell: bash
+
+ - name: Print cache-key
+ run: echo cache-key = ${{ steps.vars.outputs.cache-key }}
+
+ - name: Cache choosenim
+ id: cache-choosenim
+ uses: actions/cache@v1
+ with:
+ path: ~/.choosenim
+ key: ${{ runner.os }}-choosenim-${{ steps.vars.outputs.cache-key }}
+ - name: Cache nimble
+ id: cache-nimble
+ uses: actions/cache@v1
+ with:
+ path: ~/.nimble
+ key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
+ - uses: jiro4989/setup-nim-action@v1
+ with:
+ nim-version: ${{ matrix.nim_version }}
+
+ - name: Test examples
+ run: |
+ cd examples
+ for file in $(ls -v example_*nim); do
+ echo "=== test: $file ==="
+ nim c "$file"
+ echo ""
+ done
+ shell: bash
diff --git a/examples/config.nims b/examples/config.nims
new file mode 100644
index 0000000..3bb69f8
--- /dev/null
+++ b/examples/config.nims
@@ -0,0 +1 @@
+switch("path", "$projectDir/../src") \ No newline at end of file