chore(main): release apiwork 0.6.1 (#33) #342
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, master] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - run: bundle exec bundler-audit --update | |
| - run: bundle exec rubocop --parallel | |
| test: | |
| name: Test (Ruby ${{ matrix.ruby }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ['3.2', '3.3', '3.4'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - run: RAILS_ENV=test bundle exec rake -f spec/dummy/Rakefile db:schema:load | |
| - run: bundle exec rspec | |
| deploy-docs: | |
| name: Deploy Docs | |
| needs: [lint, test] | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| - env: | |
| RAILS_ENV: test | |
| run: | | |
| cd docs/playground | |
| bundle install | |
| bundle exec rake db:setup | |
| bundle exec rake apiwork:docs:reference | |
| bundle exec rake docs:generate | |
| - uses: pnpm/action-setup@v5 | |
| with: | |
| version: latest | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: pnpm | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - run: cd docs && pnpm install --frozen-lockfile && pnpm run build | |
| - uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: docs/.vitepress/dist | |
| - uses: actions/deploy-pages@v5 | |
| id: deploy | |
| all-green: | |
| name: All checks passing | |
| if: always() | |
| needs: [lint, test, deploy-docs] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: | | |
| [[ "${{ needs.lint.result }}" == "success" ]] || exit 1 | |
| [[ "${{ needs.test.result }}" == "success" ]] || exit 1 | |
| [[ "${{ needs.deploy-docs.result }}" =~ ^(success|skipped)$ ]] || exit 1 |