feat: integrate type checker into compiler for return type validation #39
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Ruby 컴파일러 테스트 | |
| test: | |
| name: Ruby ${{ matrix.ruby }} Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ['3.1', '3.2', '3.3', '3.4'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run tests | |
| run: bundle exec rspec --format progress --format RspecJunitFormatter --out tmp/rspec_results.xml | |
| continue-on-error: false | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-ruby-${{ matrix.ruby }} | |
| path: tmp/rspec_results.xml | |
| # RuboCop 린트 검사 | |
| lint: | |
| name: RuboCop Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - name: Run RuboCop | |
| run: bundle exec rubocop --format github | |
| # 테스트 커버리지 | |
| coverage: | |
| name: Test Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - name: Run tests with coverage | |
| run: bundle exec rspec | |
| env: | |
| COVERAGE: true | |
| - name: Upload coverage to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| file: coverage/lcov.info | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| # 문서 예제 검증 | |
| docs-verify: | |
| name: Docs Verification | |
| runs-on: ubuntu-latest | |
| continue-on-error: true # Don't fail CI if docs have issues | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - name: Verify documentation examples | |
| run: bundle exec rake docs:verify | |
| # 전체 상태 체크 | |
| ci-status: | |
| name: CI Status | |
| runs-on: ubuntu-latest | |
| needs: [test, lint, coverage] | |
| if: always() | |
| steps: | |
| - name: Check CI status | |
| run: | | |
| if [[ "${{ needs.test.result }}" == "failure" ]] || \ | |
| [[ "${{ needs.lint.result }}" == "failure" ]] || \ | |
| [[ "${{ needs.coverage.result }}" == "failure" ]]; then | |
| echo "CI failed" | |
| exit 1 | |
| fi | |
| echo "CI passed" |