Skip to content

[nodejs] exit gracefully #2

[nodejs] exit gracefully

[nodejs] exit gracefully #2

Workflow file for this run

# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
haxe:
- development
- 4.3.2
- 4.2.5
- 4.1.5
steps:
- name: Show environment variables
shell: bash
run: env | sort
- name: Git Checkout
uses: actions/checkout@v2 #https://github.com/actions/checkout
- name: "Cache Haxelib Repository"
uses: actions/cache@v2
with:
path: $RUNNER_TOOL_CACHE/haxe/${{ matrix.haxe }}/x64/lib
key: ${{ runner.os }}-haxelib-${{ hashFiles('**/haxelib.json') }}
restore-keys: |
${{ runner.os }}-haxelib-
- name: Upgrade brew
if: runner.os == 'macOS'
env:
# https://docs.brew.sh/Manpage#environment
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: |
echo "::group::brew update" && brew update && echo "::endgroup::"
echo "::group::brew config" && brew config && echo "::endgroup::"
# workaround to prevent "/usr/local/... is not inside a keg" during "brew install mono"
rm /usr/local/bin/2to3
rm /usr/local/share/man/man1/*
rm /usr/local/share/man/man5/*
- name: Set up Python 3
uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: 3.8
- name: Configure Python 3
if: runner.os == 'Windows'
shell: cmd
# workaround for https://github.com/actions/setup-python/issues/123
run: mklink "%pythonLocation%\python3.exe" "%pythonLocation%\python.exe"
- name: Install Haxe ${{ matrix.haxe }}
uses: krdlab/setup-haxe@v1 # https://github.com/krdlab/setup-haxe
with:
haxe-version: ${{ matrix.haxe }}
- name: Install haxe libs
shell: bash
run: |
haxelib install travix
# to always use the latest version of travix comment out the previous line and uncomment the next
# haxelib git travix https://github.com/back2dos/travix && pushd . && cd $(haxelib config)travix/git && haxe build-neko.hxml -lib hx3compat && popd
haxelib run travix install
##################################################
# Tests
##################################################
- name: Test [interp ]
run: haxelib run travix interp
- name: Test [neko ]
run: haxelib run travix neko
- name: Test [python ]
run: haxelib run travix python
- name: Test [node ]
run: haxelib run travix node
- name: Test [js ]
run: haxelib run travix js
- name: Test [flash ]
run: haxelib run travix flash
- name: Test [java ]
run: haxelib run travix java
- name: Test [cpp ]
run: haxelib run travix cpp
- name: Test [cs ]
run: haxelib run travix cs
- name: Test [php ]
run: haxelib run travix php
- name: Test [php7 ]
run: haxelib run travix php7
- name: Test [lua ]
run: haxelib run travix lua