Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 8be6011

Browse files
author
John Andersen
authored
ci: Move from Travis to GitHub Actions
1 parent 211ccc2 commit 8be6011

File tree

4 files changed

+68
-49
lines changed

4 files changed

+68
-49
lines changed

.github/workflows/testing.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Testing
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 40
11+
matrix:
12+
check: [CHANGELOG, WHITESPACE, STYLE]
13+
python-version: [3.7]
14+
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -U -e .[dev]
25+
- name: Run check
26+
run: |
27+
${{ matrix.check }}=1 ./.ci/run.sh
28+
29+
test:
30+
31+
runs-on: ubuntu-latest
32+
strategy:
33+
max-parallel: 40
34+
matrix:
35+
plugin: [., examples/shouldi, model/tensorflow, model/scratch, model/scikit, source/mysql, feature/git, feature/auth, service/http]
36+
python-version: [3.7]
37+
38+
steps:
39+
- uses: actions/checkout@v1
40+
- name: Set up Python ${{ matrix.python-version }}
41+
uses: actions/setup-python@v1
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
- name: Install dependencies
45+
run: |
46+
mkdir -p ~/.local/bin
47+
python -m pip install --upgrade pip
48+
pip install -U -e .[dev]
49+
if [ "${{ matrix.plugin }}" == "feature/git" ]; then
50+
curl -sSL https://github.com/XAMPPRocky/tokei/releases/download/v9.1.1/tokei-v9.1.1-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C "$HOME/.local/bin/"
51+
sudo apt-get update && sudo apt-get install -y git subversion cloc openssl
52+
fi
53+
if [ "${{ matrix.plugin }}" == "source/mysql" ]; then
54+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
55+
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
56+
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io
57+
docker pull mariadb:10
58+
fi
59+
- name: Test
60+
run: |
61+
export PATH="${HOME}/.local/bin:${PATH}"
62+
PLUGIN=${{ matrix.plugin }} LOGGING=debug ./.ci/run.sh
63+
if [ "x${{ matrix.plugin }}" = "x." ]; then
64+
CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} codecov
65+
fi

.travis.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Changed
99
- Features were moved from ModelContext to ModelConfig
10+
- CI is now run via GitHub Actions
1011
### Fixed
1112
- DataFlows with multiple possibilities for a source for an input, now correctly
1213
look through all possible sources instead of just the first one.

examples/shouldi/tests/test_bandit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
class TestRunBanditOp(AsyncTestCase):
99
async def test_run(self):
1010
results = await run_bandit(os.getcwd())
11-
self.assertLessEqual(
12-
int(results["report"]["CONFIDENCE.HIGH_AND_SEVERITY.HIGH"]), 5.0
11+
self.assertEqual(
12+
type(results["report"]["CONFIDENCE.HIGH_AND_SEVERITY.HIGH"]), int
1313
)

0 commit comments

Comments
 (0)