HeiPorSPECTRAL dataset example #70
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
name: HeiPorSPECTRAL dataset example | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run once a week on Monday morning at 00:00 UTC | |
- cron: "0 0 * * 1" | |
jobs: | |
download_dataset: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download dataset | |
run: | | |
wget --no-verbose https://heiporspectral.org/example.zip | |
unzip -q example.zip | |
- uses: actions/cache@v4 | |
with: | |
path: HeiPorSPECTRAL_example | |
key: dataset | |
- name: List files | |
run: tree HeiPorSPECTRAL_example | |
test_dataset: | |
name: Test the dataset on ${{ matrix.os }} | |
needs: download_dataset | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v4 | |
with: | |
# Include requirements.txt so that the caching works | |
sparse-checkout: | | |
requirements.txt | |
tutorials/website_example.py | |
sparse-checkout-cone-mode: false | |
- uses: actions/cache@v4 | |
with: | |
path: HeiPorSPECTRAL_example | |
enableCrossOsArchive: true | |
key: dataset | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install htc package | |
run: pip install imsy-htc | |
- name: Run example | |
env: | |
PATH_Tivita_HeiPorSPECTRAL: HeiPorSPECTRAL_example | |
run: python tutorials/website_example.py |