-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (36 loc) · 1.07 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: ci
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-20.04
strategy:
matrix:
linter: ["black", "mypy", "ruff"]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Lint code
run: touch .env && docker compose run ${{ matrix.linter }}
test:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Test code
run: touch .env && docker compose run tests_with_coverage
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
publish:
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'sinzlab'
needs: [lint, test]
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Build distribution artifacts
run: touch .env && docker compose run build
- name: Upload distribution packages to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}