diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f05ada22..65a296d3 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -59,11 +59,17 @@ jobs: pip install poetry poetry install + - name: Install BATS for e2e tests + uses: bats-core/bats-action@1.5.4 + - name: Run Tests + env: + BATS_LIBS_ROOT: /usr/lib run: | poetry run poe precommit poetry run poe coverage poetry run secureli build + poetry run poe e2e secureli-release-noop: diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml index c4c2cf52..30259049 100644 --- a/.github/workflows/pr_lint.yml +++ b/.github/workflows/pr_lint.yml @@ -16,5 +16,5 @@ jobs: - uses: morrisoncole/pr-lint-action@v1.7.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - title-regex: "(chore|style|test|feat|fix|docs): .+" + title-regex: "(chore|style|test|feat|fix|docs|ci): .+" on-failed-regex-fail-action: true diff --git a/pyproject.toml b/pyproject.toml index b381ad30..b2a7e081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ install = "poetry install" lint = "black --check ." precommit = "pre-commit run -a" test = ["init", "lint", "coverage_run", "coverage_report"] -e2e = "bats tests/end-to-end/test.bats" +e2e = "bats --verbose-run tests/end-to-end/test.bats" [tool.poetry.dependencies] # Until `python-dependency-injector` supports python 3.12, restrict to python 3.11 and lower diff --git a/tests/end-to-end/test.bats b/tests/end-to-end/test.bats index 6e9180c7..b093c74f 100644 --- a/tests/end-to-end/test.bats +++ b/tests/end-to-end/test.bats @@ -5,11 +5,11 @@ setup() { @test "can run secureli init" { run python secureli/main.py init -ry - assert_output --partial 'seCureLI has not been setup yet.' - assert_output --partial 'seCureLI has been installed successfully (language = Python)' + assert_output --partial 'Hooks successfully updated to latest version' + assert_output --partial 'seCureLI has been installed successfully' } @test "can run secureli scan" { - run python secureli/main.py scan -y - assert_output --partial 'Scan executed successfully and detected no issues!' + run python secureli/main.py scan -y -m all-files + assert_output --partial 'Detected the following language(s):' }