Skip to content

Commit

Permalink
create git workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
takaebato committed Mar 15, 2024
1 parent 67d74ba commit 0ec32a6
Showing 1 changed file with 39 additions and 29 deletions.
68 changes: 39 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
#name: Ruby
#
#on:
# push:
# branches:
# - master
#
# pull_request:
#
#jobs:
# build:
# runs-on: ubuntu-latest
# name: Ruby ${{ matrix.ruby }}
# strategy:
# matrix:
# ruby:
# - '3.1.3'
#
# steps:
# - uses: actions/checkout@v4
# - name: Set up Ruby & Rust
# uses: oxidize-rb/actions/setup-ruby-and-rust@v1
# with:
# ruby-version: ${{ matrix.ruby }}
# bundler-cache: true
# cargo-cache: true
# rubygems: '3.4.22'
# - name: Run the default task
# run: bundle exec rake
name: Main

on:
push:
branches:
- master
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v3
- name: Up docker
run: docker compose up -d ruby-rust
- name: Check rubocop
run: docker compose exec ruby-rust /bin/bash -c 'bundle exec rake rubocop'
- name: Check syntax tree
run: docker compose exec ruby-rust /bin/bash -c 'bundle exec rake stree:check'
- name: Check Rust
run: docker compose exec ruby-rust /bin/bash -c 'cargo clippy'
test-ruby:
runs-on: ubuntu-latest
name: Ruby-${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
ruby:
- '3.0.2'
- '3.1.4'
- '3.2.2'
- '3.3.0'
steps:
- uses: actions/checkout@v3
- name: Up docker
run: RUBY_VERSION=${{ matrix.ruby }} docker compose up -d ruby-rust
- name: Run Tests
run: docker compose exec ruby-rust /bin/bash -c 'bundle exec rake compile && bundle exec rake spec'

0 comments on commit 0ec32a6

Please sign in to comment.