fix yapf typo #1
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: Test for build scripts | |
on: | |
push: # ci work when pushing main branch | |
branches: | |
- main | |
paths: | |
- "scripts/install_qtsit_conda.ps1" | |
- "scripts/install_qtsit_conda.sh" | |
- "requirements/**" | |
pull_request: # ci work when creating a PR to main branch | |
branches: | |
- main | |
paths: | |
- "scripts/install_qtsit_conda.ps1" | |
- "scripts/install_qtsit_conda.sh" | |
- "requirements/**" | |
jobs: | |
bash-build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ['3.9'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache pip modules for Linux | |
if: runner.os == 'Linux' | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/**') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Cache pip modules for MacOS | |
if: runner.os == 'macOS' | |
uses: actions/cache@v3 | |
with: | |
path: ~/Library/Caches/pip | |
key: ${{ matrix.os }}-pip-${{ hashFiles('requirements/**') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (failure check) | |
continue-on-error: true | |
shell: bash -l {0} | |
run: | | |
source scripts/install_qtsit_conda.sh | |
- name: Install all dependencies | |
shell: bash -l {0} | |
run: | | |
source scripts/install_qtsit_conda.sh ${{ matrix.python-version }} cpu | |
- name: Import Checks | |
shell: bash -l {0} | |
run: | | |
conda activate qtsit | |
python -V | |
python -c 'import qtsit; print("qtsit version %s" % qtsit.__version__)' | |
powershell-build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.9'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache pip packages for Windows | |
uses: actions/cache@v3 | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ matrix.os }}-pip-${{ hashFiles('env.*.yml') }} | |
- name: Install miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (failure check) | |
continue-on-error: true | |
shell: pwsh | |
run: | | |
. .\scripts\install_qtsit_conda.ps1 | |
- name: Install dependencies | |
shell: pwsh | |
run: | | |
. .\scripts\install_qtsit_conda.ps1 ${{ matrix.python-version }} cpu | |
- name: Import Checks | |
shell: pwsh | |
run: | | |
conda activate qtsit | |
python -V | |
python -c "import qtsit; print('qtsit version %s' % qtsit.__version__)" |