-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: better themes; splitting CI into jobs (#57)
- Loading branch information
Showing
21 changed files
with
682 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install ShellCheck | ||
run: | | ||
scversion="stable" # or "v0.4.7", or "latest" | ||
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv | ||
mkdir -p ${HOME}/bin | ||
cp -v "shellcheck-${scversion}/shellcheck" ${HOME}/bin | ||
${HOME}/bin/shellcheck --version | ||
- name: ShellCheck | ||
run: | | ||
${HOME}/bin/shellcheck -a $(find {bin,lib} -type f) || true | ||
echo; echo; echo | ||
${HOME}/bin/shellcheck -a $(find {bin,lib} -type f) | egrep -c '^In ' || true | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Parallel | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:13.1-alpine | ||
env: | ||
POSTGRES_PASSWORD: password | ||
ports: | ||
- 5432:5432 | ||
# needed because the postgres container does not provide a health check | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./ | ||
id: cpu-count | ||
- name: Run Tests in Parallel | ||
env: | ||
TERM: xterm-256color | ||
MIN_WIDTH: 80 | ||
run: | | ||
export CPU_COUNT="$(cat /proc/cpuinfo | grep processor | wc -l)" | ||
tput setab n; tput clear | ||
source init.sh | ||
output.constrain-screen-width ${MIN_WIDTH} | ||
note "Running specs with CPU_COUNT=${CPU_COUNT}" | ||
h1 ".bats-prefix/bin/bats --pretty -T -j ${CPU_COUNT:-8}" $(find test -name '*_test.bats' -type f) | ||
.bats-prefix/bin/bats --pretty -T -j "${CPU_COUNT:-8}" $(find test -name '*_test.bats' -type f) || { | ||
code=$? | ||
error "Parallel Tests failed with exit code ${code}" | ||
warning "Ignoring parallel test failure...." | ||
} | ||
true | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:13.1-alpine | ||
env: | ||
POSTGRES_PASSWORD: password | ||
ports: | ||
- 5432:5432 | ||
# needed because the postgres container does not provide a health check | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Test | ||
env: | ||
TERM: xterm-256color | ||
MIN_WIDTH: 80 | ||
run: bin/specs -t -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.