-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run tests in GitHub Actions instead of Travis CI
Replace Travis CI configuration and run trigger file with an equivalent GitHub Actions workflow to run bats-core units tests on pushes to pull requests targeting master, or pushes to master itself. Currently limited to running on Ubuntu 16.04 to avoid OpenSSL warning mesages from later versions (see #55) from breaking the (too fragile) tests.
- Loading branch information
Showing
3 changed files
with
37 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Tests | ||
|
||
on: | ||
# Only run tests on push to master branch | ||
push: | ||
branches: [master] | ||
# Run tests for all pull request changes targeting master | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
# We use older Ubuntu for now to avoid warning from newer OpenSSL (#55) | ||
# which break output expectations in some (fragile) tests | ||
runs-on: ubuntu-16.04 | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install and set up bats-core | ||
run: | | ||
git clone https://github.com/bats-core/bats-core.git /tmp/bats-core-repo | ||
mkdir -p /tmp/bats-core | ||
bash /tmp/bats-core-repo/install.sh /tmp/bats-core | ||
# Need to configure git globally to avoid errors when we create and use | ||
# temporary test-specific Git repos fatal: `empty ident name` | ||
- name: Configure dummy Git user.[name,email] values | ||
run: | | ||
git config --global user.name github-actions-user | ||
git config --global user.email [email protected] | ||
- name: Run tests | ||
run: /tmp/bats-core/bin/bats tests/ |
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