Merge remote-tracking branch 'origin/master' #181
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: Build, lint and test | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
python: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Setup Java 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r Requirements.txt | |
curl -O https://www.antlr.org/download/antlr-4.11.1-complete.jar | |
- name: Lint with flake8 | |
run: | | |
pip install flake8 | |
# stop the build if there are Python style violations | |
flake8 . --count --show-source --statistics | |
flake8 tests --config tests/.flake8 --count --show-source --statistics | |
- name: Generate test parsers | |
run: ./generate-test-parsers.sh | |
working-directory: tests | |
- name: Test with pytest | |
run: | | |
pip install pytest pytest-cov pyecore==0.12.2 | |
pytest --cov=pylasu --cov-fail-under=60 tests |