From cfd6c83ddbaa46e7867c823748db40fef9abaeb9 Mon Sep 17 00:00:00 2001 From: Rajesh Singh Date: Sun, 28 Apr 2024 09:58:49 +0530 Subject: [PATCH] update actions --- .github/workflows/ci.yml | 30 ++++++++++++++--------------- .github/workflows/run_notebooks.yml | 24 +++++++++++++---------- tests/test_notebooks.py | 10 +++++----- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ea5455..1ecea8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,27 +1,27 @@ name: CI -on: [push, pull_request] +on: [push] jobs: + build: + + runs-on: ubuntu-latest - build-and-test: - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python-version: [3.7] steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python + # This is the version of the action for setting up Python, not the Python version. + uses: actions/setup-python@v4 with: - python-version: 3.7 - architecture: x64 - - name: Print version + # Semantic version range syntax or exact version of a Python version + python-version: '3.x' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + + - name: Display Python version run: python -c "import sys; print(sys.version)" + - name: Install dependencies run: python -m pip install -r requirements.txt diff --git a/.github/workflows/run_notebooks.yml b/.github/workflows/run_notebooks.yml index dc95afa..d4a933c 100644 --- a/.github/workflows/run_notebooks.yml +++ b/.github/workflows/run_notebooks.yml @@ -1,23 +1,27 @@ name: notebooks -on: [push, pull_request] - +on: [push] jobs: - build-and-test: - name: check examples + build: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python + # This is the version of the action for setting up Python, not the Python version. + uses: actions/setup-python@v4 with: - python-version: 3.7 - architecture: x64 - - name: Print version + # Semantic version range syntax or exact version of a Python version + python-version: '3.x' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + + - name: Display Python version run: python -c "import sys; print(sys.version)" + - name: Install dependencies run: cd tests && python -m pip install -r test_req.txt diff --git a/tests/test_notebooks.py b/tests/test_notebooks.py index 91557b2..b75c76b 100644 --- a/tests/test_notebooks.py +++ b/tests/test_notebooks.py @@ -93,11 +93,11 @@ def export_notebook(ipath, opath): os.chdir('../examples/') cwd =os.getcwd() -path1 = cwd+'/ex1-unboundedFlow.ipynb' -path2 = cwd+'/ex2-flowPlaneSurface.ipynb' -path3 = cwd+'/ex5-phoreticField.ipynb' -path4 = cwd+'/ex8-holographicTrap.ipynb' -path5 = cwd+'/ex3-crystalNucleation.ipynb' +path1 = cwd+'/ex01-unboundedFlow.ipynb' +path2 = cwd+'/ex02-flowPlaneSurface.ipynb' +path5 = cwd+'/ex03-crystalNucleation.ipynb' +path3 = cwd+'/ex05-phoreticField.ipynb' +path4 = cwd+'/ex08-holographicTrap.ipynb' test_notebook(path1) test_notebook(path2) test_notebook(path3)