From e38ec227ab4e4c8dff1fa4c0d1908ff9e4ca447d Mon Sep 17 00:00:00 2001 From: k Date: Sat, 14 Oct 2023 13:45:34 +0200 Subject: [PATCH] [ci] move to github actions --- .editorconfig | 2 +- .github/workflows/test.yml | 48 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------- samples/docs/README.md | 8 ++++++- samples/docs/makefile | 3 +++ 5 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.editorconfig b/.editorconfig index 1afdd36..a52b6d2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,7 @@ insert_final_newline = true indent_style = tab indent_size = 4 -[*.json] +[*.{json,yml}] indent_style = space indent_size = 2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..20bdb40 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,48 @@ +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: | + git config --global url."https://github.com/".insteadOf "git@github.com:" + haxelib newrepo + haxelib install munit + haxelib install hxnodejs + haxelib git tink_hxx git@github.com:kLabz/tink_hxx.git + haxelib git tink_anon git@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 + + - name: "[Samples] TODO App" + run: | + cd samples/todoapp + haxelib newrepo + haxelib dev react ../.. + haxelib install msignal + haxe build.hxml 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: