From adf72061666813456200f3bf083c8389eaca4bfe Mon Sep 17 00:00:00 2001 From: Gerald Woo Date: Tue, 11 Jun 2024 13:41:45 +0800 Subject: [PATCH] Add GitHub Actions (#70) * Update lint.yml * Add test workflow --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5ed748e..10a8040 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: psf/black@stable with: - use_pyproject: true + options: "--check --verbose --line-length 88" jupyter: true isort: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a88a881 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e '.[dev,notebook]' + - name: Test with pytest + run: | + pytest test