Skip to content

Merge pull request #40 from twonote/update-test-python-version #79

Merge pull request #40 from twonote/update-test-python-version

Merge pull request #40 from twonote/update-test-python-version #79

# Github Actions workflow syntax documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
# Useful Github Actions Triggers reference:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-a-custom-action#triggers
name: "Continuous Integration"
on: [push, pull_request] # run unit tests on each commit so developers can notice errors as early as possible
jobs:
unit_tests:
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix: # matrix testing strategy
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out repository code
uses: actions/checkout@v2
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# necessary after Python 3.12 / gh-95299
- name: Install setuptools
run: pip install setuptools
- name: Install solid
run: python setup.py install
- name: Install pytest
run: pip install pytest
- name: Run pytest
run: pytest
integration_tests:
name: Integration tests
runs-on: ubuntu-latest
strategy:
matrix: # matrix testing strategy
python-version: ['3.9'] # integration is expensive so testing only 1 major version
steps:
- name: Check out repository code
uses: actions/checkout@v2
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install solid
run: python setup.py install
- name: Install pytest
run: pip install pytest
- name: Run Solid Authorization tests
run: python tests/integration_test_auth.py
- name: Run Solid API tests
run: python tests/integration_test_solid_api.py