forked from opendistro-for-elasticsearch/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.77 KB
/
sql-cli-test-and-build-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
name: SQL CLI Test and Build
on: [pull_request, push]
jobs:
build:
runs-on: [ubuntu-16.04]
defaults:
run:
working-directory: sql-cli
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout SQL CLI
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install setuptools wheel
- name: Set up ES and install SQL plugin
run: |
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt update
sudo apt install openjdk-13-jdk
sudo apt install unzip
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.10.0-amd64.deb
sudo dpkg -i elasticsearch-oss-7.10.0-amd64.deb
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-sql/opendistro_sql-1.12.0.0.zip
sudo systemctl start elasticsearch.service
- name: Run Tox Testing
run: tox
- name: Stop ES
run: sudo systemctl stop elasticsearch.service
- name: Build Artifact
run: python setup.py sdist bdist_wheel
- name: Create Artifact Path
run: |
mkdir -p opendistro-sql-cli-builds
cp -r ./dist/*.tar.gz ./dist/*.whl opendistro-sql-cli-builds/
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: opendistro-sql-cli
path: sql-cli/opendistro-sql-cli-builds