Skip to content

Commit 3ab4d9f

Browse files
authored
Merge pull request #623 from chisholm/update-workflow
Update github workflow
2 parents f6173c0 + bbad3b3 commit 3ab4d9f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.github/workflows/python-ci-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on: [push, pull_request]
66
env:
77
POSTGRES_USER: postgres
88
POSTGRES_PASSWORD: postgres
9-
POSTGRES_DB: postgres
9+
POSTGRES_DB: stix
1010

1111
jobs:
1212
test-job:
1313
runs-on: ubuntu-latest
1414

1515
services:
1616
postgres:
17-
image: postgres:11
17+
image: postgres
1818
# Provide the password for postgres
1919
env:
2020
POSTGRES_USER: postgres
@@ -34,9 +34,9 @@ jobs:
3434

3535
name: Python ${{ matrix.python-version }} Build
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4.2.2
3838
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v2
39+
uses: actions/setup-python@v5.4.0
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242
- name: Install and update essential dependencies
@@ -48,7 +48,7 @@ jobs:
4848
run: |
4949
tox
5050
- name: Upload coverage information to Codecov
51-
uses: codecov/codecov-action@v4.2.0
51+
uses: codecov/codecov-action@v5.4.0
5252
with:
5353
token: ${{ secrets.CODECOV_TOKEN }}
5454
fail_ci_if_error: false # optional (default = false)

stix2/test/v21/test_datastore_relational_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import stix2.registry
1616
import stix2.v21
1717

18-
_DB_CONNECT_URL = f"postgresql://{os.getenv('POSTGRES_USER', 'postgres')}:{os.getenv('POSTGRES_PASSWORD', 'postgres')}@0.0.0.0:5432/postgres"
18+
_DB_CONNECT_URL = f"postgresql://{os.getenv('POSTGRES_USER', 'postgres')}:{os.getenv('POSTGRES_PASSWORD', 'postgres')}@0.0.0.0:5432/{os.getenv('POSTGRES_DB', 'postgres')}"
1919

2020
store = RelationalDBStore(
2121
PostgresBackend(_DB_CONNECT_URL, True),

tox.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ envlist = py38,py39,py310,py311,py312,packaging,pre-commit-check
33

44
[testenv]
55
deps =
6-
tox
76
pytest
87
pytest-cov
98
coverage
10-
taxii2-client
11-
rapidfuzz
12-
haversine
139
medallion
14-
sqlalchemy
15-
sqlalchemy_utils
16-
psycopg2
10+
11+
extras =
12+
taxii
13+
semantic
14+
relationaldb
1715

1816
commands =
1917
python -m pytest --cov=stix2 stix2/test/ --cov-report term-missing -W ignore::stix2.exceptions.STIXDeprecationWarning
2018

21-
passenv = GITHUB_*
19+
passenv =
20+
GITHUB_*
21+
POSTGRES_*
2222

2323
[testenv:packaging]
2424
deps =

0 commit comments

Comments
 (0)