diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 0b0f35e..0ba5507 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -10,8 +10,6 @@ on: types: [opened, synchronize] branches: - '*' - paths: - - .github/workflows/upstream.yml # this file jobs: tests: @@ -37,14 +35,15 @@ jobs: run: bin/test user-journey: - name: "user-journey (rails main)" + name: "user-journey (rails ${{ matrix.ref }})" runs-on: ${{matrix.plat}}-latest strategy: fail-fast: false matrix: - plat: ["ubuntu", "windows", "macos"] + plat: ["ubuntu"] + ref: ["7-2-stable", "v8.0.0.beta1", "main"] env: - RAILSOPTS: --git=https://github.com/rails/rails --branch main + RAILSOPTS: --git=https://github.com/rails/rails --ref=${{ matrix.ref }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 diff --git a/test/integration/user_journey_test.sh b/test/integration/user_journey_test.sh index 4016ec2..1877e87 100755 --- a/test/integration/user_journey_test.sh +++ b/test/integration/user_journey_test.sh @@ -32,12 +32,13 @@ bundle add rails --skip-install ${RAILSOPTS:-} bundle add tailwindcss-rails --path="../.." bundle install bundle show --paths +bundle binstubs --all # install tailwindcss bin/rails tailwindcss:install # TEST: tailwind was installed correctly -grep tailwind app/views/layouts/application.html.erb +grep -q tailwind app/views/layouts/application.html.erb # TEST: rake tasks don't exec (#188) cat <> Rakefile @@ -47,3 +48,13 @@ end EOF bin/rails tailwindcss:build still_here | grep "Rake process did not exit early" + +if [[ $(rails -v) > "Rails 8.0.0.beta" ]] ; then + # TEST: presence of the generated file + bin/rails generate authentication + grep -q PasswordsController app/controllers/passwords_controller.rb +fi + +# TEST: presence of the generated file +bin/rails generate scaffold post title:string body:text published:boolean +grep -q "Show this post" app/views/posts/index.html.erb