Skip to content

Replace Karma with @web/test-runner #976

Replace Karma with @web/test-runner

Replace Karma with @web/test-runner #976

Workflow file for this run

name: CI
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
cancel-in-progress: true
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize]
branches: [ '*' ]
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_REGION: us
SAUCE_TUNNEL_IDENTIFIER: trix-${{ github.run_id }}
jobs:
build:
name: Browser tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Start Sauce Connect
if: ${{ env.SAUCE_ACCESS_KEY != '' }}
uses: saucelabs/sauce-connect-action@v3
with:
username: ${{ env.SAUCE_USERNAME }}
accessKey: ${{ env.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}
region: ${{ env.SAUCE_REGION }}
proxyLocalhost: allow
- name: Install Playwright Browsers
if: ${{ env.SAUCE_ACCESS_KEY == '' }}
run: npx playwright install --with-deps chromium
- run: bin/ci
- name: Fail when generated npm changes are not checked-in
run: |
git update-index --refresh && git diff-index --quiet HEAD --
rails-tests:
name: Downstream Rails integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "3.4"
apt-get: libvips-tools
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Packaging
run: yarn build
- name: Clone Rails
run: git clone --depth=1 https://github.com/rails/rails
- name: Configure Rails
run: |
cd rails
yarn install --frozen-lockfile
bundle add action_text-trix --path ".."
bundle show --paths action_text-trix
- name: Action Text tests
run: |
cd rails/actiontext
bundle exec rake test test:system
action_text-trix:
name: Action Text tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: "3.2"
rails_branch: 7-2-stable
- ruby: "3.3"
rails_branch: 7-2-stable
- ruby: "3.4"
rails_branch: 7-2-stable
- ruby: "3.2"
rails_branch: 8-0-stable
- ruby: "3.3"
rails_branch: 8-0-stable
- ruby: "3.4"
rails_branch: 8-0-stable
- ruby: "3.2"
rails_branch: 8-1-stable
- ruby: "3.3"
rails_branch: 8-1-stable
- ruby: "3.4"
rails_branch: 8-1-stable
- ruby: "3.2"
rails_branch: main
experimental: true
- ruby: "3.3"
rails_branch: main
experimental: true
- ruby: "3.4"
rails_branch: main
experimental: true
- ruby: head
rails_branch: main
experimental: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- uses: ruby/setup-ruby@v1
env:
RAILS_BRANCH: ${{ matrix.rails_branch }}
with:
working-directory: "./action_text-trix"
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
env:
RAILS_BRANCH: ${{ matrix.rails_branch }}
continue-on-error: ${{ matrix.experimental || false }}
working-directory: "./action_text-trix"
run: bin/rails test:all