-
Notifications
You must be signed in to change notification settings - Fork 30
82 lines (68 loc) · 1.94 KB
/
build-and-release.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build and release
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
suite:
[
unit,
functional_wsp,
functional_arxiv,
functional_desy,
functional_cds,
functional_pos,
functional_elsevier,
functional_aps
]
python-version: [2.7]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install python dependencies
run: |
python -m pip install pip==24.0
pip install setuptools wheel check-manifest
pip install -e .[tests]
- name: Show python dependencies
run: |
pip freeze
- name: Install dependencies
run: |
docker-compose -f docker-compose.deps.py2.yml build
docker-compose -f docker-compose.test.py2.yml run --rm scrapyd-deploy
- name: Print logs if failure
if: ${{ failure() }}
run: |
docker-compose -f docker-compose.test.py2.yml logs --tail=200
- name: Run tests
run: |
docker-compose -f docker-compose.test.py2.yml run --rm ${{ matrix.suite }}
Release:
if: ${{ github.event_name == 'push' }}
needs: Test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install python dependencies
run: |
pip install --user --upgrade pip
pip --no-cache-dir install --user setuptools wheel check-manifest
pip --no-cache-dir install --user -e .[tests]
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}