Skip to content

Commit

Permalink
Re-enable test runner GA
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonscript committed Mar 11, 2024
1 parent 0a0e9e9 commit df21974
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 36 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
name: Tinta Python CI tests

# on: [push]
on:
push:
branches:
- never
- main
tags:
- "*"

jobs:
build:
build-older-python:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest -xv --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
build-newer-python:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,10 +51,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pylint pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with pylint
# run: |
# pylint --rcfile=.pylintrc
- name: Test with pytest
run: |
pip install pytest pytest-cov
Expand Down
56 changes: 28 additions & 28 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "rm -rf dist; hatchling build; twine check dist/*",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Publish [Test]",
"type": "shell",
"command": "./publish.sh --test",
"group": "build",
"problemMatcher": []
},
{
"label": "Publish [Prod]",
"type": "shell",
"command": "./publish.sh",
"group": "build"
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "rm -rf dist; hatchling build; twine check dist/*",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
]
}
},
{
"label": "Publish [Test]",
"type": "shell",
"command": "./dist/publish.sh --test",
"group": "build",
"problemMatcher": []
},
{
"label": "Publish [Prod]",
"type": "shell",
"command": "./dist/publish.sh",
"group": "build"
}
]
}

0 comments on commit df21974

Please sign in to comment.