Skip to content

test: improve integration tests #133

test: improve integration tests

test: improve integration tests #133

Workflow file for this run

---
name: Pull request build
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
name: Lint and test project
strategy:
matrix:
node: ['18', 'latest']
env:
MAIN_NODE_VER: '18'
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: maven
- name: setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: get Python location
id: python-location
run: |
echo "python-bin-location=$(echo $pythonLocation)/bin" >> $GITHUB_OUTPUT
- name: Install project modules
run: npm ci
- name: Lint source files
run: npm run lint
- name: Run unit tests
env:
EXHORT_PYTHON3_PATH: "${{steps.python-location.outputs.python-bin-location}}/python3"
EXHORT_PIP3_PATH: "${{steps.python-location.outputs.python-bin-location}}/pip3"
run: npm run test
- name: Compile project
run: npm run compile
- name: Run integration tests
run: npm run integration-tests
- name: Upload coverage reports
if: ${{ matrix.node == env.MAIN_NODE_VER }}
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage/coverage-final.json