Skip to content

Commit

Permalink
Migrate from Azure Pipelines to GH Actions (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Oct 16, 2023
1 parent 4d3ef6e commit 69f3078
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 153 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Run tests
on:
schedule:
- cron: '0 5 * * *' # once per day at midnight ET
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
run-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- { name: linux-python3.8 , os: ubuntu-latest , python-ver: "3.8" }
- { name: linux-python3.12 , os: ubuntu-latest , python-ver: "3.12" }
- { name: windows-python3.8 , os: windows-latest, python-ver: "3.8" }
- { name: windows-python3.9 , os: windows-latest, python-ver: "3.9" }
- { name: windows-python3.10, os: windows-latest, python-ver: "3.10" }
- { name: windows-python3.11, os: windows-latest, python-ver: "3.11" }
- { name: windows-python3.12, os: windows-latest, python-ver: "3.12" }
- { name: macos-python3.8 , os: macos-latest , python-ver: "3.8" }
- { name: macos-python3.12 , os: macos-latest , python-ver: "3.12" }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-ver }}

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cookiecutter pynwb hdmf-docutils
python -m pip list
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
- name: Evaluate template from local source
run: |
cookiecutter -v --no-input --output-dir ./out .
# cookiecutter -v --no-input --output-dir "$(Agent.BuildDirectory)" .
- name: Check files
run: |
python tests/test_template_evaluation.py ./out/ndx-my-namespace/ ndx-my-namespace
# python tests/test_template_evaluation.py "$(Agent.BuildDirectory)/ndx-my-namespace/" "ndx-my-namespace"
- name: Run PyNWB tests from generated extension
run: |
cd ./out/ndx-my-namespace
# cd "$(Agent.BuildDirectory)/ndx-my-namespace"
python -m pip install -r requirements-dev.txt
python -m pip install .
pytest
- name: Build documentation from generated extension
run: |
set -e
cd ./out/ndx-my-namespace/docs
# cd "$(Agent.BuildDirectory)/ndx-my-namespace/docs"
make apidoc
make html
80 changes: 0 additions & 80 deletions azure-pipelines-nightly.yml

This file was deleted.

73 changes: 0 additions & 73 deletions azure-pipelines.yml

This file was deleted.

0 comments on commit 69f3078

Please sign in to comment.