-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (91 loc) · 2.96 KB
/
test-deploy-workflow.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
83
84
85
86
87
88
89
90
91
92
93
on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- master
jobs:
deploy:
runs-on: macos-latest
steps:
- name: Install Reindexer
run: |
brew tap restream/reindexer
brew install reindexer
shell: bash
- uses: actions/checkout@v4
- name: Build PyReindexer
run: |
brew install pipx
pipx install setuptools
python3 setup.py setuptools sdist bdist_wheel
shell: bash
- name: Deploy PyReindexer To Test-Pypi
env:
TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }}
run: |
pipx install twine
python3 -m twine upload --verbose --repository testpypi dist/* -u __token__ -p pypi-$TESTPYPI_TOKEN
# wait for deploy finishing on test pypi server
sleep 240
shell: bash
test-macos:
runs-on: macos-latest
needs: deploy
steps:
- name: Install Reindexer
run: |
brew tap restream/reindexer
brew install reindexer
shell: bash
- uses: actions/checkout@v4
- name: Install PyReindexer
run: python3 -m pip install -vvv --index-url https://test.pypi.org/simple/ --no-deps pyreindexer
shell: bash
- name: Prepare Test Environment
run: python3 -m pip install pytest==6.2.5 delegator envoy pyhamcrest==2.0.2
shell: bash
- name: Test
run: |
cd /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyreindexer
$GITHUB_WORKSPACE/.github/workflows/test.sh
shell: bash
test-ubuntu:
strategy:
matrix:
os: [ubuntu-20.04,ubuntu-22.04]
fail-fast: false
runs-on: ${{matrix.os}}
env:
OS: ${{matrix.os}}
needs: deploy
steps:
- name: Install Reindexer-Dev
run: |
curl https://repo.reindexer.io/RX-KEY.GPG | sudo apt-key add
if [[ $OS == ubuntu-20.04 ]]; then
echo 'deb https://repo.reindexer.io/ubuntu-focal /' | sudo tee -a /etc/apt/sources.list
else
echo 'deb https://repo.reindexer.io/ubuntu-jammy /' | sudo tee -a /etc/apt/sources.list
fi
sudo apt-get update -y
sudo apt-get install -y libunwind-dev
sudo apt-get install -y reindexer-dev
shell: bash
- uses: actions/checkout@v4
- name: Install PyReindexer
run: |
python3 -m pip install setuptools
python3 -m pip install -vvv --index-url https://test.pypi.org/simple/ --no-deps pyreindexer
shell: bash
- name: Install Reindexer-Server
run: sudo apt-get install reindexer-server
shell: bash
- name: Prepare Test Environment
run: python3 -m pip install pytest==6.2.5 delegator envoy pyhamcrest==2.0.2
shell: bash
- name: Test
run: |
cd $(python3 -m site --user-site)/pyreindexer
$GITHUB_WORKSPACE/.github/workflows/test.sh
shell: bash