Add GitHub Actions CI workflow
Tobi T4 consensus: alpha gems shouldn't ship without proof that 'bundle exec rake test' passes on push. Workflow runs the test suite + gem build + post-install smoke load on Ruby 3.2, 3.3, and 3.4. Workflow will activate when the repo moves to GitHub. Local 'bundle exec rake test' continues to be the dev feedback loop.
This commit is contained in:
34
.github/workflows/test.yml
vendored
Normal file
34
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
ruby: ["3.2", "3.3", "3.4"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Ruby ${{ matrix.ruby }}
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: ${{ matrix.ruby }}
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: bundle exec rake test
|
||||||
|
|
||||||
|
- name: Build gem
|
||||||
|
run: gem build opencode-ruby.gemspec
|
||||||
|
|
||||||
|
- name: Verify gem loads after install
|
||||||
|
run: |
|
||||||
|
gem install --local opencode-ruby-*.gem
|
||||||
|
ruby -ropencode-ruby -e 'puts Opencode::VERSION'
|
||||||
Reference in New Issue
Block a user