diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1fa5f26 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,40 @@ +name: Tests + +on: [push, repository_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + haxe: [4.3.2, latest] + + steps: + - uses: actions/checkout@v1 + + - name: Setup haxe ${{ matrix.haxe }} + uses: krdlab/setup-haxe@v1 + with: + haxe-version: ${{ matrix.haxe }} + + - name: Install libs + run: | + haxelib newrepo + haxelib install munit + haxelib install hxnodejs + haxelib git tink_hxx https://github.com/kLabz/tink_hxx.git + haxelib git tink_anon https://github.com/haxetink/tink_anon.git + + - name: Run tests + run: | + haxelib run munit test -js + + - name: "[Samples] SSR sample : react-next docs website" + run: | + cd samples/docs + make setup + make server + make static + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2549e3a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: haxe - -haxe: - - 3.4.4 - - stable - - 4.0.0-preview.4 - - development - -matrix: - allow_failures: - - haxe: development - -install: - - haxelib install munit - - haxelib install hxnodejs - - haxelib git tink_hxx git@github.com:kLabz/tink_anon.git - - haxelib git tink_anon git@github.com:haxetink/tink_anon.git - -script: - - haxelib run munit test -js - -# deploy: -# - provider: script -# haxe: 3.4.4 -# script: bash ./releaseHaxelib.sh $HAXELIB_USER $HAXELIB_PWD -# on: -# tags: true diff --git a/samples/docs/README.md b/samples/docs/README.md index 480b010..3071043 100644 --- a/samples/docs/README.md +++ b/samples/docs/README.md @@ -2,4 +2,10 @@ TODO: add some documentation here, or in `docs` and link here. -Run `make setup` and then `make server` to start the server on port `8042`. +Run `make setup` to install dependencies. + +Run `make server` to build and then `make start-server` to start the server on +port `8042`. + +To generate static html pages instead, run `make static`, and then +`make serve-static` to start a http server serving html files on port `8043`. diff --git a/samples/docs/makefile b/samples/docs/makefile index d3b6cad..8d4eb6f 100644 --- a/samples/docs/makefile +++ b/samples/docs/makefile @@ -7,6 +7,9 @@ setup: npm i server: + haxe build.hxml + +start-server: node bin/server.js static: