Skip to content

Commit 2a078b3

Browse files
committed
ci: Update workflows
1 parent af20d9c commit 2a078b3

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,21 @@ name: CI
33
on:
44
push:
55
branches: [ master ]
6-
tags:
7-
- "v*" # Tag events matching v*, i.e. v1.0, v20.15.10
86
pull_request:
97
branches: [ master ]
108

11-
129
jobs:
1310

14-
Lint:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: "3.x"
22-
- run: |
23-
python -m pip install --upgrade hatch
24-
pip install -e .[dev]
25-
hatch run lint
26-
2711
Test:
2812
strategy:
2913
matrix:
3014
os: [ubuntu-latest]
31-
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
15+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
3216
include:
3317
- os: windows-latest
34-
python-version: "3.11"
18+
python-version: "3.12"
3519
- os: macos-latest
36-
python-version: "3.11"
20+
python-version: "3.12"
3721

3822
runs-on: ${{ matrix.os }}
3923
steps:
@@ -47,11 +31,5 @@ jobs:
4731
python -m pip install --upgrade pip
4832
pip install -e .[dev]
4933
# stop the build if there are Python syntax errors or undefined names
50-
ruff . --select=E9,F63,F7,F82
34+
ruff check . --select=E9,F63,F7,F82
5135
pytest
52-
53-
Release:
54-
# Only run on v* tag events
55-
if: startsWith(github.ref, 'refs/tags/v')
56-
needs: [Lint, Test]
57-
uses: open2c/cooler/.github/workflows/publish.yml@master

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
name: Publish Python Package to PyPI
22

33
on:
4-
workflow_call:
4+
release:
5+
types: [published]
56
workflow_dispatch:
67

78
jobs:
89
Publish:
10+
# prevents this action from running on forks
11+
if: github.repository == 'open2c/cooler'
12+
913
runs-on: ubuntu-latest
1014
permissions:
1115
id-token: write

0 commit comments

Comments
 (0)