-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8098 from Fryguy/github_actions
Switch to GitHub Actions (cherry picked from commit b387527)
- Loading branch information
Showing
14 changed files
with
106 additions
and
91 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,64 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: | ||
- '2.7' | ||
node-version: | ||
- 12 | ||
test-suite: | ||
- spec | ||
- spec:compile | ||
- spec:debride | ||
- spec:javascript | ||
- spec:jest | ||
- spec:routes | ||
include: | ||
- ruby-version: '2.6' | ||
node-version: 12 | ||
test-suite: spec | ||
services: | ||
postgres: | ||
image: manageiq/postgresql:10 | ||
env: | ||
POSTGRESQL_USER: root | ||
POSTGRESQL_PASSWORD: smartvm | ||
POSTGRESQL_DATABASE: vmdb_test | ||
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
TEST_SUITE: ${{ matrix.test-suite }} | ||
PGHOST: localhost | ||
PGPASSWORD: smartvm | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up system | ||
run: bin/before_install | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Set up Node | ||
if: ${{ matrix.test-suite == 'spec:compile' || matrix.test-suite == 'spec:javascript' || matrix.test-suite == 'spec:jest' }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: yarn | ||
registry-url: https://npm.manageiq.org/ | ||
- name: Prepare tests | ||
run: bin/setup | ||
- name: Run tests | ||
run: bundle exec rake | ||
- name: Report code coverage | ||
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' && matrix.test-suite == 'spec' }} | ||
continue-on-error: true | ||
uses: paambaati/[email protected] |
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ package-lock.json | |
Gemfile.lock | ||
Gemfile.dev.rb | ||
_yardoc/ | ||
bin/* | ||
coverage/ | ||
doc/ | ||
pkg/ | ||
|
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
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,28 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "$CI" ]; then | ||
echo "== Installing system packages ==" | ||
sudo apt-get install libcurl4-openssl-dev | ||
echo | ||
fi | ||
|
||
if [ -n "$CI" -a \( "$TEST_SUITE" = "spec:javascript" -o "$TEST_SUITE" = "spec:jest" \) ]; then | ||
# Install google-chrome-beta | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | ||
sudo apt-get update | ||
sudo apt-get install google-chrome-beta | ||
echo | ||
fi | ||
|
||
gem_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)" | ||
spec_manageiq="$gem_root/spec/manageiq" | ||
|
||
if [ -n "$MANAGEIQ_REPO" ]; then | ||
echo "== Symlinking spec/manageiq to $MANAGEIQ_REPO ==" | ||
rm -rf "$spec_manageiq" | ||
ln -s "$(cd "$MANAGEIQ_REPO" &>/dev/null && pwd)" "$spec_manageiq" | ||
elif [ ! -d "$spec_manageiq" ]; then | ||
echo "== Cloning manageiq sample app ==" | ||
git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 "$spec_manageiq" | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 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 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 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.