Skip to content

Development

Development #17

Workflow file for this run

name: a2lparser
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository under $GITHUB_WORKSPACE and install python
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
# Set up virtual environment
- name: Create virtual environment
run: |
python -m pip install --upgrade pip
python -m venv .venv
- name: Activate virtual environment
run: |
source .venv/bin/activate
# Install a2lparser dependencies
- name: Install dependencies
run: |
pip install coverage pytest pytest-timeout
pip install -r requirements.txt
# Initialize a2lparser by importing for first time
- name: Initialize a2lparser
run: |
python -c "import a2lparser"
# Run Testcases and generate report
- name: Testcases
run: |
coverage run --omit="test_a2l_ast.py,tests/*,a2lparser/gen/*" -m pytest -v --timeout=30
coverage report -m
coverage xml
# Upload code coverage report
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
env_vars: OS,PYTHON
name: codecov-umbrella
verbose: true