bump version to 0.1.3 #148
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] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '.ruby-version' | |
| # Install all gems (both test and development) | |
| bundler-cache: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Enable pnpm cache | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| cache-dependency-path: | | |
| pnpm-lock.yaml | |
| docs/pnpm-lock.yaml | |
| - name: Install npm packages | |
| run: | | |
| # Install root and docs pnpm dependencies | |
| pnpm install --frozen-lockfile | |
| cd docs && pnpm install --frozen-lockfile && cd .. | |
| - name: Generate CSpell dictionaries from package lockfiles | |
| run: | | |
| scripts/generate_lockfile_words.sh | |
| - name: CSpell (Spellcheck) | |
| run: scripts/spellcheck.sh | |
| - name: Changelog has entry for current version | |
| run: ruby scripts/check_changelog_version.rb | |
| - name: Prettier (Formatting) | |
| run: scripts/prettier.sh --check | |
| - name: Tapioca (Verify RBI files) | |
| run: | | |
| # Add a few excluded gems to tapioca config (different RBI on Mac vs. Linux) | |
| ruby -r yaml -e ' | |
| CONFIG_FILE = "sorbet/tapioca/config.yml" | |
| config = YAML.load_file(CONFIG_FILE) | |
| config["gem"]["exclude"] += ["rack", "amazing_print"] | |
| config["gem"]["exclude"].sort!.uniq! | |
| File.write(CONFIG_FILE, config.to_yaml) | |
| ' | |
| bundle exec tapioca gems --verify | |
| bundle exec tapioca dsl --verify | |
| git checkout sorbet/tapioca/config.yml || true | |
| - name: Check for RBI changes | |
| run: | | |
| # Check if there are any uncommitted changes to RBI files | |
| git status --porcelain sorbet/rbi/ | |
| if [[ -n $(git status --porcelain sorbet/rbi/) ]]; then | |
| echo "Error: RBI files are out of date. Please run 'tapioca gems' and 'tapioca dsl' and commit the changes." | |
| git diff sorbet/rbi/ | |
| exit 1 | |
| fi | |
| - name: RuboCop (Linting/Formatting) | |
| run: bin/rubocop | |
| - name: Sorbet (Typecheck) | |
| run: scripts/typecheck.sh | |
| docs: | |
| name: 'Next.js Site Tests' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '.ruby-version' | |
| bundler-cache: true | |
| - name: Setup Node.js (docs) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Enable pnpm cache (docs) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: Install docs dependencies | |
| run: cd docs && pnpm install --frozen-lockfile | |
| - name: Export TypeScript types from LogStruct | |
| run: | | |
| scripts/generate_structs.rb | |
| - name: TypeScript type checking | |
| run: | | |
| cd docs && pnpm exec tsc --noEmit | |
| - name: Run TypeScript tests | |
| run: | | |
| cd docs && pnpm test | |
| pilot: | |
| name: 'Pilot Test: Ruby 3.4 / Rails 8.0' | |
| runs-on: ubuntu-22.04 | |
| env: | |
| RAILS_VERSION: '8.0.1' | |
| RUBY_VERSION: '3.4' | |
| CI: 'true' | |
| BUNDLE_WITHOUT: 'development' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Remove Gemfile.lock since we're changing Ruby and Rails versions | |
| - name: Remove Gemfile.lock for variable Ruby/Rails versions | |
| run: rm -f Gemfile.lock | |
| - name: Setup Ruby 3.4 | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4' | |
| bundler-cache: true | |
| # Coverage: /coverage | |
| - name: Run tests | |
| run: bundle exec scripts/test.rb | |
| # Coverage: /coverage_rails | |
| - name: Run Rails integration tests | |
| run: scripts/rails_tests.sh | |
| - name: Upload raw coverage directories | |
| uses: actions/upload-artifact@v4 | |
| if: success() | |
| with: | |
| name: raw-coverage-ruby3.4-rails8.0 | |
| path: | | |
| coverage | |
| coverage_rails | |
| retention-days: 5 | |
| include-hidden-files: true | |
| # Merges /coverage and /coverage_rails into /docs/public/coverage/ | |
| - name: Merge coverage reports | |
| run: scripts/merge_coverage.sh | |
| - name: Enforce coverage threshold (>= 80%) | |
| run: ruby scripts/check_coverage_threshold.rb | |
| # Save merged coverage data as an artifact for deploy workflow | |
| - name: Upload coverage reports | |
| uses: actions/upload-artifact@v4 | |
| if: success() | |
| with: | |
| name: coverage-ruby3.4-rails8.0 | |
| path: | | |
| docs/public/coverage/ | |
| retention-days: 5 | |
| matrix: | |
| name: 'Tests: ${{ matrix.name }}' | |
| needs: [lint, pilot] | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: 'Ruby 3.3 / Rails 7.1' | |
| ruby: '3.3' | |
| rails: '7.1.5.1' | |
| - name: 'Ruby 3.4 / Rails 7.2' | |
| ruby: '3.4' | |
| rails: '7.2.2.1' | |
| - name: 'Ruby 3.4.5 / Rails 8.1.0.beta1' | |
| ruby: '3.4.5' | |
| rails: '8.1.0.beta1' | |
| env: | |
| RAILS_VERSION: ${{ matrix.rails }} | |
| RUBY_VERSION: ${{ matrix.ruby }} | |
| CI: 'true' | |
| BUNDLE_WITHOUT: 'development' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Remove Gemfile.lock since we're changing Ruby and Rails versions | |
| - name: Remove Gemfile.lock for variable Ruby/Rails versions | |
| run: rm -f Gemfile.lock | |
| - name: Setup Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run Ruby tests | |
| run: scripts/test.rb | |
| - name: Run Rails integration tests | |
| run: scripts/rails_tests.sh |