Add scripts for running jobs on SLURM #426
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: python-lint-and-test | |
on: [ push ] | |
jobs: | |
python-check: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ 3.11 ] | |
os: | |
- ubuntu-latest | |
# - macos-latest # at the moment bitsandbytes installation fails on macOS | |
# - windows-latest # utf-8 bugs on windows (https://github.com/pre-commit/pre-commit/issues/835) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
- name: Cache pre-commit | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Install deps | |
run: | | |
python -m pip install --upgrade pip | |
make install_cpu | |
- name: Lint | |
run: make check | |
python-test: | |
needs: | |
- python-check | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ 3.11 ] | |
os: | |
- ubuntu-latest | |
# - macos-latest # at the moment bitsandbytes installation fails on macOS | |
# - windows-latest # utf-8 bugs on windows (https://github.com/pre-commit/pre-commit/issues/835) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
- name: Install deps | |
run: | | |
python -m pip install --upgrade pip | |
make install_cpu | |
- name: Test | |
env: | |
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} | |
run: make test |