-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42af905
commit 408c4d9
Showing
1 changed file
with
17 additions
and
65 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,35 @@ | ||
name: CI | ||
name: Run Pytest on Multiple Python Versions | ||
|
||
on: | ||
# Triggers the workflow on push only for the master branch or pull request events | ||
push: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} ${{ matrix.name-suffix }}" | ||
runs-on: ${{ matrix.os }} | ||
test: | ||
strategy: | ||
matrix: | ||
include: | ||
- name-suffix: "Linux" | ||
os: ubuntu-20.04 | ||
python-version: 3.6 | ||
BUILD_COMMAND: sdist | ||
#- name-suffix: "Mac" | ||
# os: macos-latest | ||
# python-version: 3.8 | ||
# BUILD_COMMAND: sdist | ||
#- name-suffix: "Windows" | ||
# os: windows-latest | ||
# python-version: 3.9 | ||
# BUILD_COMMAND: sdist | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Runs a single command using the runners shell | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
if [ ${{ runner.os }} == 'Windows' ]; then | ||
call tools\\windows-install-deps.bat -y -t -s -u | ||
else | ||
set +e # subprocesses that return >0 should not stop the script | ||
source tools/linux-install-deps.sh -y -t -s -u | ||
cprint "AAAAAAAAAAAAAAAA" | ||
pip_bin | ||
pip_bin list | ||
python -m pip list | ||
cprint "AAAAAAAAAAAAAAAA" | ||
fi | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install pytest | ||
- name: Print python info | ||
- name: Run tests | ||
run: | | ||
cprint "AAAAAAAAAAAAAAAA" | ||
pip_bin | ||
pip_bin list | ||
python -m pip list | ||
cprint "AAAAAAAAAAAAAAAA" | ||
python -m pip list | ||
python ci/info_platform.py | ||
- name: Generate source package or wheel | ||
run: | | ||
python setup.py ${{ matrix.BUILD_COMMAND }} | ||
ls dist | ||
- name: Install package | ||
run: python -m pip install --pre --find-links dist/ spectrocrunch | ||
|
||
- name: Run the tests | ||
run: python -m unittest -v spectrocrunch.tests.test_all.test_suite | ||
pytest . |