-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] [MORPHY] Switch to GitHub Actions #9332
Open
Fryguy
wants to merge
4
commits into
ManageIQ:morphy
Choose a base branch
from
Fryguy:github_actions
base: morphy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+111
−102
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,56 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: | ||
- '2.6' | ||
node-version: | ||
- 12 | ||
test-suite: | ||
- spec | ||
- spec:compile | ||
- spec:debride | ||
- spec:javascript | ||
- spec:jest | ||
- spec:routes | ||
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@v4 | ||
- 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@v4 | ||
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 |
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
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,40 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "$CI" ]; then | ||
echo "== Installing system packages ==" | ||
sudo apt-get update | ||
sudo apt-get install -y 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 -y google-chrome-beta | ||
echo | ||
fi | ||
|
||
if [ -n "$ACT" ]; then | ||
# Install yarn | ||
curl -o- -L https://yarnpkg.com/install.sh | bash | ||
echo "$HOME/.yarn/bin" >> $GITHUB_PATH | ||
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH | ||
|
||
# Install cmake so we can build rugged gem | ||
sudo apt-get install -y cmake | ||
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 morphy --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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
require 'pathname' | ||
require 'fileutils' | ||
|
||
require "pathname" | ||
|
||
gem_root = Pathname.new(__dir__).join("..") | ||
spec_manageiq = gem_root.join("spec/manageiq") | ||
system(gem_root.join("bin/before_install").to_s) | ||
|
||
if ENV.key?("MANAGEIQ_REPO") | ||
manageiq_repo = Pathname.new(ENV["MANAGEIQ_REPO"]) | ||
puts "== Symlinking spec/manageiq to #{manageiq_repo}" | ||
require gem_root.join("spec/manageiq/lib/manageiq/environment") | ||
ManageIQ::Environment.manageiq_plugin_setup(gem_root) | ||
|
||
FileUtils.rm_rf(spec_manageiq.expand_path) | ||
FileUtils.ln_s(manageiq_repo.expand_path, spec_manageiq.expand_path) | ||
elsif !spec_manageiq.exist? | ||
puts "== Cloning manageiq sample app ==" | ||
system "git clone https://github.com/ManageIQ/manageiq.git --branch morphy --depth 1 spec/manageiq" | ||
if %w[spec:compile spec:javascript spec:jest].include?(ENV["TEST_SUITE"]) | ||
puts "\n== Updating UI assets ==" | ||
exit $?.exitstatus unless system("bundle exec rake update:ui") | ||
end | ||
|
||
require gem_root.join("spec/manageiq/lib/manageiq/environment").to_s | ||
ManageIQ::Environment.manageiq_plugin_setup(gem_root) |
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because we always end up with a bonus file from the master branch when switching branches to morphy and it shouldn't be committed.