chore(ci): update test.sh and workflow #5
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
name: MiniGo CI | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
build-test-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest coverage antlr4-python3-runtime==4.9.2 | |
pip install -e . | |
- name: Download ANTLR JAR | |
run: | | |
curl -O https://www.antlr.org/download/antlr-4.9.2-complete.jar | |
- name: Run unit tests with coverage | |
run: | | |
export ANTLR_JAR="$(pwd)/MiniGo/src/antlr-4.9.2-complete.jar" | |
cd "MiniGo/src" | |
./test.sh all_with_coverage | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
if: success() |