Skip to content

Commit

Permalink
2813587 Replace CircleCI with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
scifisamurai committed Feb 21, 2024
1 parent d7e4883 commit 0054fbd
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 57 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/ci.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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 }}
steps:
- name: checkout
uses: actions/[email protected]

- name: setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- 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
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GEM

PLATFORMS
arm64-darwin-21
x86_64-linux

DEPENDENCIES
benchmark-ips
Expand Down

0 comments on commit 0054fbd

Please sign in to comment.