github/workflows: Add "test.yml"
This commit is contained in:
parent
575535636a
commit
b88cbd312c
22
.github/workflows/test.sh
vendored
Normal file
22
.github/workflows/test.sh
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
tmpdir=$(mktemp -d)
|
||||||
|
|
||||||
|
export OSH="$tmpdir/path with space"
|
||||||
|
export HOME="$tmpdir/home with space"
|
||||||
|
mkdir -p "$HOME"
|
||||||
|
|
||||||
|
OSH_REPOSITORY="$PWD" ./tools/install.sh
|
||||||
|
|
||||||
|
source "$HOME/.bashrc"
|
||||||
|
|
||||||
|
set | grep -aE "^OSH"
|
||||||
|
|
||||||
|
if [[ "$OSH_THEME" == "font" ]]; then
|
||||||
|
echo "Installation succeeded"
|
||||||
|
else
|
||||||
|
echo "Installation failed, \$OSH_THEME is not set to 'font'"
|
||||||
|
exit 1
|
||||||
|
fi
|
28
.github/workflows/test.yml
vendored
Normal file
28
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
# ubuntu-20.04 available: https://github.com/actions/virtual-environments/issues/1816
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
submodules: false
|
||||||
|
- name: Upgrade bash on Mac
|
||||||
|
if: runner.os == 'macOs'
|
||||||
|
run: brew install bash
|
||||||
|
- name: Install oh-my-bash
|
||||||
|
shell: bash
|
||||||
|
run: bash --noprofile --norc -i "$PWD/.github/workflows/test.sh"
|
Loading…
Reference in New Issue
Block a user