From 5b565652f1777c4a6bd87a8a28fbab6c6ed74639 Mon Sep 17 00:00:00 2001 From: Rafal Wojdyla Date: Mon, 29 Apr 2024 19:40:06 +0900 Subject: [PATCH] Add CI workflow: lint + test --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 17 ----------------- README.md | 2 ++ 3 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fdb7032 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + pull_request: + push: + branches: [main, test] + +jobs: + pre-commit: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: pre-commit/action@v3.0.1 + test: + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install '.[dev]' + - run: pytest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 064d6fe..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Lint - -on: - pull_request: - push: - branches: [main, test] - -jobs: - pre-commit: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - uses: pre-commit/action@v3.0.1 diff --git a/README.md b/README.md index 2125f85..3ffbc2c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![CI](https://github.com/sgkit-dev/bio2zarr/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sgkit-dev/bio2zarr/actions/workflows/ci.yml) + # bio2zarr Convert bioinformatics file formats to Zarr