-
Notifications
You must be signed in to change notification settings - Fork 178
75 lines (65 loc) · 1.92 KB
/
influx-migration-tests-linux.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
name: Influx migration script tests on Linux
on:
push:
branches:
- '**'
paths:
- 'tools/python/influx-migration/**'
pull_request:
branches:
- '**'
paths:
- 'tools/python/influx-migration/**'
env:
INFLUX_SRC_TOKEN: "test-token"
INFLUX_DEST_TOKEN: $INFLUX_SRC_TOKEN
INFLUX_CLI_VERSION: 2.7.3
defaults:
run:
shell: bash
working-directory: 'tools/python/influx-migration'
jobs:
linux64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.7
id: setup-python
uses: actions/setup-python@v5
with:
# Minimum supported Python version for the Influx migration script
python-version: '3.7'
- name: Install dependencies
id: install-dependencies
if: ${{ success() }}
run: |
sudo apt update
sudo apt upgrade
sudo apt install wget
python3 -m venv env
source env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install boto3 influxdb_client pandas parameterized
- name: Install Influx CLI
run: |
mkdir influxdb2-client
wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-$INFLUX_CLI_VERSION-linux-amd64.tar.gz
tar -xvzf influxdb2-client-$INFLUX_CLI_VERSION-linux-amd64.tar.gz -C influxdb2-client/
sudo cp influxdb2-client/influx /usr/local/bin
rm -rf influxdb2-client
rm influxdb2-client-$INFLUX_CLI_VERSION-linux-amd64.tar.gz
- name: Setup InfluxDB Docker container
id: setup-influxdb-docker-container
if: ${{ success() }}
run: |
bash scripts/influxdb-restart.sh
- name: Run unit tests
id: run-unit-tests
run: |
source env/bin/activate
python3 unit_test.py
- name: Run integration tests
id: run-integration-tests
run: |
source env/bin/activate
python3 integration_test.py