test: run integration scripts in tmp/ work directory #392
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: upstream | |
| concurrency: | |
| group: "${{github.workflow}}-${{github.ref}}" | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 8 * * 3" # At 08:00 on Wednesday # https://crontab.guru/#0_8_*_*_3 | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: | |
| - '*' | |
| env: | |
| GEM_HOME: ${{ github.workspace }}/.gem # Needs to be a writable directory to bundle remove/add | |
| permissions: {} | |
| jobs: | |
| tests: | |
| name: "tests (rails main)" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ["4.0"] | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 | |
| with: | |
| ruby-version: ${{matrix.ruby}} | |
| - run: | | |
| rm Gemfile.lock | |
| bundle remove actionmailer | |
| git clone --depth 1 --branch main https://github.com/rails/rails | |
| bundle add rails --path=rails --skip-install | |
| bundle install | |
| - name: Run tests | |
| run: bin/test | |
| user-install: | |
| name: "user-install (rails ${{ matrix.ref }})" | |
| runs-on: ${{matrix.plat}}-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| plat: ["ubuntu"] | |
| ref: ["7-2-stable", "8-0-stable", "8-1-stable", "main"] | |
| env: | |
| RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }} | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 | |
| with: | |
| ruby-version: "4.0" | |
| bundler: latest | |
| - run: test/integration/user_install_test.sh | |
| shell: bash | |
| user-upgrade: | |
| name: "user-upgrade (rails ${{ matrix.ref }})" | |
| runs-on: ${{matrix.plat}}-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| plat: ["ubuntu"] | |
| ref: ["7-2-stable", "8-0-stable", "8-1-stable", "main"] | |
| env: | |
| RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }} | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 | |
| with: | |
| ruby-version: "4.0" | |
| bundler: latest | |
| - run: test/integration/user_upgrade_test.sh | |
| shell: bash |