Skip to content

Commit

Permalink
Merge pull request #47 from wpoely86/ugent-master
Browse files Browse the repository at this point in the history
Drop travis, use github actions
  • Loading branch information
itkovian authored Nov 23, 2022
2 parents aaede7a + 15d6728 commit ceae793
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 19 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/testpatterns.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: test logstash patterns
on: [push, pull_request]

jobs:
test_patterns:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.6]
steps:
- name: add logstash repo
uses: myci-actions/add-deb-repo@4
with:
repo: deb https://artifacts.elastic.co/packages/7.x/apt stable main
repo-name: elastic-7.x
keys: D27D666CD88E42B4
- name: install logstash
run: sudo apt-get install logstash
- name: add logstash to path
run: echo "/usr/share/logstash/bin" >> $GITHUB_PATH
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: run tests
run: tox -v -c tox.ini
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env groovy

def LOGSTASH_VERSION = "7.6.2"
def LOGSTASH_VERSION = "7.10.2"

node {
stage('checkout git') {
Expand All @@ -10,8 +10,8 @@ node {
}

stage('install logstash') {
sh "wget -nv https://artifacts.elastic.co/downloads/logstash/logstash-${LOGSTASH_VERSION}.tar.gz"
sh "tar -xzf logstash-${LOGSTASH_VERSION}.tar.gz"
sh "wget -nv https://artifacts.elastic.co/downloads/logstash/logstash-${LOGSTASH_VERSION}-linux-x86_64.tar.gz"
sh "tar -xzf logstash-${LOGSTASH_VERSION}-linux-x86_64.tar.gz"
env.PATH = "${pwd()}/logstash-${LOGSTASH_VERSION}/bin:${env.PATH}"
}

Expand Down
4 changes: 3 additions & 1 deletion tests/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def get_data(directory='data', globpattern='*[!~]'):

def process(stdout, expected_size):
"""Take in stdout, return list of dicts that are created via loading the json output"""
ignore = re.compile(r'((:message=>)|Sending Logstash logs to|Thread.exclusive is deprecated)')
ignore_patterns = ["(:message=>)", "Sending Logstash logs to", "Thread.exclusive is deprecated",
"^Using bundled JDK", "^WARNING", "^Could not find log4j2 configuration"]
ignore = re.compile('(' + '|'.join(ignore_patterns) + ')')
output = []
warning = re.compile(r"(warning:|Sending Logstash('s)? logs to|\[WARN \]|\[INFO \])")
for line in stdout.split("\n"):
Expand Down
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
envlist = py27,py36
skipsdist = true

[gh-actions]
python =
2.7: py27
3.6: py36

[testenv]
commands_pre =
pip install 'setuptools<42.0'
Expand Down

0 comments on commit ceae793

Please sign in to comment.