Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 13
chore(ci): Migrate from Travis to GH actions#367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
e0ffa46ceb3d1a022ff97b6ded4351ecec4e560b0987474ea43f4236e300817f64d495File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| name: CI | ||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-22.04 | ||
| services: | ||
| postgres: | ||
| image: postgres:16 | ||
| env: | ||
| POSTGRES_USER: travis | ||
| POSTGRES_HOST_AUTH_METHOD: trust | ||
| options: >- | ||
| --health-cmd pg_isready | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| ports: | ||
| - 5432:5432 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ruby: ['3.0', '3.1', '3.2', '3.3'] | ||
| env: | ||
| PGPORT: 5432 | ||
| PGUSER: travis | ||
| PGHOST: localhost | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby }} | ||
| bundler-cache: true | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: 'yarn' | ||
| - name: Run tests | ||
| run: bundle exec rake test | ||
| release: | ||
| needs: test | ||
| runs-on: ubuntu-22.04 | ||
| if: github.ref == 'refs/heads/master' | ||
| permissions: | ||
| contents: write | ||
| id-token: write # required for RubyGems trusted publishing | ||
| steps: | ||
| - name: Generate GitHub App token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v1 | ||
| with: | ||
| app-id: ${{ secrets.RELEASE_BOT_APP_ID }} | ||
| private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }} | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ steps.app-token.outputs.token }} | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.0' | ||
| bundler-cache: true | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| - name: Install semantic-release | ||
| run: | | ||
| npm i -g \ | ||
| semantic-release \ | ||
| @semantic-release/git \ | ||
| @semantic-release/changelog \ | ||
| semantic-release-rubygem | ||
| - name: Configure RubyGems credentials | ||
| uses: rubygems/configure-rubygems-credentials@v1 | ||
| - name: Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | ||
| run: ./release.sh | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| #!/bin/bash | ||
| # using bash wrapper as Rake blows up in `require/extentiontask` (line 10) | ||
| # using bash wrapper as Rake blows up in `require/extensiontask` (line 10) | ||
| RELEASE_FLAGS="" | ||
| if [ ! -z "$TRAVIS_REPO_SLUG" ]; then | ||
| RELEASE_FLAGS="-r git+https://github.com/${TRAVIS_REPO_SLUG}.git" | ||
| fi | ||
| if [ ! -z "$GITHUB_REPOSITORY" ]; then | ||
| RELEASE_FLAGS="-r git+https://github.com/${GITHUB_REPOSITORY}.git" | ||
| fi | ||
| if [ ! -z "$GEM_ALTERNATIVE_NAME" ]; then | ||
dividedmind marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| echo "Release: GEM_ALTERNATIVE_NAME=$GEM_ALTERNATIVE_NAME" | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.