Skip to content

Commit

Permalink
Merge pull request #4 from clementsan/CuPy
Browse files Browse the repository at this point in the history
CuPy - Add pyproject.toml config file and GitHub action
  • Loading branch information
clementsan authored Apr 1, 2024
2 parents 27c0c90 + 21e23af commit 5b8f48d
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 424 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "master", "dev", "CuPy"]
pull_request:
branches: [ "master" ]
workflow_dispatch:

permissions:
contents: read

env:
CURSES: False
TERM: xterm
ECLIPSE: ECLIPSE
# TESTINPUTPATH: ${{ github.workspace }}/testdata
# TESTOUTPUTPATH: ${{ github.workspace }}/testdata_output

jobs:
build:

# runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Create test data folders (Mac and linux)
if: runner.os != 'Windows'
run: |
echo ${{ github.workspace }}
mkdir -p ${{ github.workspace }}/testdata ${{ github.workspace }}/testdata_output
echo "TESTINPUTPATH=${{ github.workspace }}/testdata" >> $GITHUB_ENV
echo "TESTOUTPUTPATH=${{ github.workspace }}/testdata_output" >> $GITHUB_ENV
- name: Create test data folders for Windows
if: runner.os == 'Windows'
run: |
echo ${{ github.workspace }}
mkdir -p ${{ github.workspace }}\testdata
mkdir -p ${{ github.workspace }}\testdata_output
echo "TESTINPUTPATH=${{ github.workspace }}\testdata" >> $env:GITHUB_ENV
echo "TESTOUTPUTPATH=${{ github.workspace }}\testdata_output" >> $env:GITHUB_ENV
- name: Echo test data folders (Mac and linux)
if: runner.os != 'Windows'
run: |
echo $TESTINPUTPATH
echo $TESTOUTPUTPATH
- name: Echo test data folders for Windows
if: runner.os == 'Windows'
run: |
echo $env:TESTINPUTPATH
echo $env:TESTOUTPUTPATH
- name: Test with unittest
run: |
python -m unittest discover -s ./test -p 'test_grid_division*.py'
Loading

0 comments on commit 5b8f48d

Please sign in to comment.