Skip to content

Commit

Permalink
Merge pull request #26 from EverFi/2813435-gha-gems
Browse files Browse the repository at this point in the history
2813435 Adds GHA
  • Loading branch information
danbickford007 authored Feb 21, 2024
2 parents 9b0c571 + 5886879 commit 8bb3811
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 65 deletions.
65 changes: 0 additions & 65 deletions .circleci/config.yml

This file was deleted.

76 changes: 76 additions & 0 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Test and Build
on:
push:

jobs:
verify_gemfile_lock:
runs-on: ubuntu-latest
env:
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: checkout
uses: actions/[email protected]
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.3
bundler-cache: true # runs 'bundle install' and caches installed gems
- name: bundler
shell: bash
run: |-
gem install bundler -v $(grep 'BUNDLED WITH' Gemfile.lock -A 1|tail -1)
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Verify Gemfile.lock
shell: bash
run: |-
if git diff-index --quiet HEAD -- Gemfile.lock
then
exit 0
else
echo "Please ensure that you have bundled and committed any"
echo "resulting changes to the Gemfile.lock file in this repo."
git --no-pager diff -- Gemfile.lock
exit 128
fi
test_and_build:
runs-on: ubuntu-latest
env:
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{ secrets.GITHUB_TOKEN }}
services:
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- name: checkout
uses: actions/[email protected]
- uses: ankane/setup-elasticsearch@v1
with:
elasticsearch-version: 7.10.2
plugins: |
analysis-kuromoji
analysis-smartcn
analysis-stempel
analysis-ukrainian
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.3
bundler-cache: true # runs 'bundle install' and caches installed gems
- name: bundler
shell: bash
run: |-
gem install bundler -v $(grep 'BUNDLED WITH' Gemfile.lock -A 1|tail -1)
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: specs
shell: bash
run: |-
# Run specs to ensure build is passing
bundle exec rake test
# Run rake build to ensure gem will build
bundle exec rake build
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ GEM
multipart-post (2.2.3)
nokogiri (1.13.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
parallel_tests (3.13.0)
parallel
Expand All @@ -117,13 +121,17 @@ GEM
redis (4.8.0)
ruby2_keywords (0.0.5)
sqlite3 (1.5.0-arm64-darwin)
sqlite3 (1.5.0-x86_64-darwin)
sqlite3 (1.5.0-x86_64-linux)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)

PLATFORMS
arm64-darwin-21
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
actionpack (~> 7.0.0)
Expand Down

0 comments on commit 8bb3811

Please sign in to comment.