Update the CI #66
This file contains 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
name: main | |
on: push | |
jobs: | |
test: | |
runs-on: ${{matrix.target == 'hl' && 'windows-latest' || 'ubuntu-latest'}} | |
strategy: | |
matrix: | |
target: [hl, java, js, php] | |
steps: | |
- name: Fetch sources | |
uses: actions/checkout@v3 | |
- name: Set up Lix | |
uses: lix-pm/setup-lix@master | |
- name: Set up HashLink | |
if: matrix.target == 'hl' | |
uses: cedx/setup-hashlink@v3 | |
- name: Set up Java | |
if: matrix.target == 'java' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Set up Node.js | |
if: matrix.target == 'js' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Set up PHP | |
if: matrix.target == 'php' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: curl, intl, mbstring, simplexml | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/haxe | |
~/AppData/Roaming/haxe | |
key: haxe-${{runner.os}}-lix-${{hashFiles('.haxerc', 'haxe_libraries/*.hxml')}} | |
restore-keys: haxe-${{runner.os}}-lix- | |
- name: Install dependencies | |
run: lix download | |
- name: Run tests | |
env: | |
FREEMOBILE_ACCOUNT: ${{secrets.FREEMOBILE_ACCOUNT}} | |
FREEMOBILE_API_KEY: ${{secrets.FREEMOBILE_API_KEY}} | |
run: haxe test_${{matrix.target}}.hxml | |
- name: Collect code coverage | |
if: success() | |
uses: codecov/codecov-action@v3 | |
with: | |
files: var/lcov.info | |
flags: ${{matrix.target}} |