-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (65 loc) · 1.85 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Verify README examples, release to PyPI
on:
push:
branches: [ "main" ]
tags: [ "v**" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
test:
name: Verify README examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: 'requirements*.txt'
- name: Install dvc-utils
run: pip install -e . -r requirements-ci.txt
- name: '`dvc pull` test/data'
working-directory: test/data
run: dvc pull -r s3 -R -A
- name: Set up parquet-helpers
uses: actions/checkout@v4
with:
repository: ryan-williams/parquet-helpers
path: pqt
- name: Verify README examples
env:
# Evaluate README examples from within the `test/data` submodule
BMDF_WORKDIR: test/data
run: |
. pqt/.pqt-rc
export SHELL
mdcmd
git diff --exit-code
release:
name: Release to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install release deps
run: pip install utz[setup] twine wheel
- name: Install dvc-utils
run: pip install -e .
- name: Build release
run: python setup.py sdist bdist_wheel
- name: Publish release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*