Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# GitHub Workflows

This directory contains the GitHub Actions workflows for this project.

## Workflows

- **`create.release.for.tag.yml`**: This workflow automates the process of creating a new GitHub release whenever a new tag is pushed to the repository. It generates release notes based on the commit history since the last tag.

- **`run-tests.yml`**: This workflow runs the project's test suite on every pull request to the `main` branch. This ensures that all changes are verified before being merged.
23 changes: 23 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run Tests

on:
pull_request:
branches:
- main

jobs:
test:
name: Run test suite
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y bc

- name: Run tests
run: |
chmod +x jury/render-the-verdict.sh
./jury/render-the-verdict.sh
7 changes: 5 additions & 2 deletions jury/render-the-verdict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Run the setup script.
"${SCRIPT_DIR}/assemble-the-jury.sh"

# cd into the jury directory to run the tests.
cd "${SCRIPT_DIR}" || exit 1

# Run the bats tests with pretty output.
"${SCRIPT_DIR}/test_libs/bats-core-1.12.0/bin/bats" --pretty "${SCRIPT_DIR}" > "${SCRIPT_DIR}/verdict.txt"
"test_libs/bats-core-1.12.0/bin/bats" --pretty . > "verdict.txt"

# Run the bats tests with TAP output.
"${SCRIPT_DIR}/test_libs/bats-core-1.12.0/bin/bats" --tap "${SCRIPT_DIR}" > "${SCRIPT_DIR}/verdict.tap"
"test_libs/bats-core-1.12.0/bin/bats" --tap . > "verdict.tap"
File renamed without changes.
148 changes: 148 additions & 0 deletions jury/verdict.tap
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
1..54
not ok 1 alpha: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./alpha.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/alpha/alpha.sh ]
# --
#
ok 2 alpha: runs without errors for 1 second
ok 3 beta screensaver runs
not ok 4 bouncing: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./bouncing.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/bouncing/bouncing.sh ]
# --
#
not ok 5 bouncing: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./bouncing.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/bouncing/bouncing.sh’: No such file or directory
# --
#
not ok 6 cutesaver: main script should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./cutesaver.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/cutesaver/cutesaver.sh ]
# --
#
not ok 7 cutesaver: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./cutesaver.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/cutesaver/cutesaver.sh’: No such file or directory
# --
#
not ok 8 fireworks: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./fireworks.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/fireworks/fireworks.sh ]
# --
#
not ok 9 fireworks: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./fireworks.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/fireworks/fireworks.sh’: No such file or directory
# --
#
ok 10 library-of-voices: can be sourced
ok 11 library-of-voices: lov_detect_engine function exists
ok 12 library-of-voices: lov_say function exists
ok 13 library-of-voices: lov_kill_speech function exists
not ok 14 library-of-voices: lov_detect_engine sets a TTS engine
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./library-of-voices.bats, line 34)
# `assert [ -n "$LOV_TTS_ENGINE" ]' failed
#
# -- assertion failed --
# expression : [ -n ]
# --
#
not ok 15 matrix: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./matrix.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/matrix/matrix.sh ]
# --
#
not ok 16 matrix: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./matrix.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/matrix/matrix.sh’: No such file or directory
# --
#
not ok 17 pipes: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./pipes.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/pipes/pipes.sh ]
# --
#
not ok 18 pipes: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./pipes.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/pipes/pipes.sh’: No such file or directory
# --
#
not ok 19 rain: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./rain.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/rain/rain.sh ]
# --
#
not ok 20 rain: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./rain.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/rain/rain.sh’: No such file or directory
# --
#
not ok 21 smile-for-the-camera: exits if asciinema is not found
# (from function `setup' in test file ./smile-for-the-camera.bats, line 5)
# `chmod +x "$SCRIPT"' failed
not ok 24 teardown_file failed
# (from function `source' in file ./smile-for-the-camera.bats, line 39,
# from function `bats_run_setup_file' in file test_libs/bats-core-1.12.0/libexec/bats-core/bats-exec-file, line 99,
# from function `main' in test file test_libs/bats-core-1.12.0/libexec/bats-core/bats-exec-file, line 382)
# `bats_run_setup_file' failed
# bats warning: Executed 22 instead of expected 54 tests
Loading
Loading