Add unit tests #131
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions | |
| name: CI | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**/*.md' | |
| - '.vscode/*' | |
| pull_request: | |
| # workflow_dispatch: | |
| # repository_dispatch: | |
| # schedule: | |
| # - cron: '0 4 * * *' | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| haxe: | |
| - latest | |
| - 4.3.7 | |
| 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@v4 | |
| # with: | |
| # path: $RUNNER_TOOL_CACHE/haxe/${{ matrix.haxe }}/x64/lib | |
| # key: ${{ runner.os }}-haxelib-${{ hashFiles('**/haxelib.json') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-haxelib- | |
| - name: Install Haxe ${{ matrix.haxe }} | |
| uses: krdlab/setup-haxe@v2 # https://github.com/krdlab/setup-haxe | |
| with: | |
| haxe-version: ${{ matrix.haxe }} | |
| - name: Install haxe libs | |
| shell: bash | |
| id: prerequisites | |
| run: | | |
| haxelib git utest https://github.com/haxe-utest/utest.git | |
| ################################################## | |
| # Tests | |
| ################################################## | |
| - name: Build bare test | |
| run: | | |
| echo "Building bare test" | |
| cd tests/bare/ | |
| haxe test.hxml | |
| cd ../../ | |
| - name: Build unit tests | |
| run: | | |
| echo "Building unit tests" | |
| cd tests/unit/ | |
| haxe test.hxml | |
| cd ../../ |