diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5c95cea..a5b3e6b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: python-version: ["3.11"] - + # Service containers to run with `container-job` services: # Label used to access the service container @@ -32,27 +32,27 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - - name: Test with pytest - run: | - pytest tests - env: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + - name: Test with pytest + run: | + pytest tests -k test_db_9 -s + env: # Env vars for pytest POSTGRES_USERNAME: postgres POSTGRES_HOST: localhost @@ -61,4 +61,4 @@ jobs: POSTGRES_PLAYBACK_DB_NAME: postgres_playback_test POSTGRES_PORT: 5432 DQM_CR_USERNAMES: "user:password" - - run: echo "🍏 This job's status is ${{ job.status }}." + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/tests/test_1.py b/tests/test_1.py index 9ea5a0f..8436331 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -226,6 +226,7 @@ def test_db_9(testing_database): print("Check DQM2MirrorDB.get_graphs_data()") truth = TEST_DB_9_TRUTH answer = json.dumps(testing_database.get_graphs_data(358792)) + print(answer) assert truth == answer