Remove invoice interstitial modal #3911
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: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| RAILS_ENV: test | |
| # In CI, run Wise and Stripe tests with valid credentials | |
| NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY || 'dummy' }} | |
| STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY || 'dummy' }} | |
| WISE_API_KEY: ${{ secrets.WISE_API_KEY || 'dummy' }} | |
| WISE_PROFILE_ID: ${{ secrets.WISE_PROFILE_ID || 0 }} | |
| jobs: | |
| rspec: | |
| runs-on: ${{ github.repository == 'antiwork/flexile' && 'ubicloud-standard-2' || 'ubuntu-latest' }} | |
| services: | |
| postgres: | |
| image: postgres:16.3 | |
| env: | |
| POSTGRES_USER: username | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: flexile_test | |
| ports: ["5432:5432"] | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7.4.2 | |
| ports: | |
| - 6389:6379 | |
| options: --entrypoint redis-server | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build setup | |
| uses: ./.github/common/ | |
| - name: Setup test database | |
| run: cd backend && bundle exec rails db:create db:schema:load | |
| - name: Run tests | |
| env: | |
| RUBY_YJIT_ENABLE: 1 | |
| run: cd backend && bundle exec rspec --format RSpec::Github::Formatter --tag ~skip --tag ~type:system --format progress | |
| timeout-minutes: 20 | |
| playwright: | |
| name: playwright | |
| runs-on: ${{ github.repository == 'antiwork/flexile' && 'ubicloud-standard-8' || 'ubuntu-latest' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build setup | |
| uses: ./.github/common/ | |
| - run: pnpm puppeteer browsers install chrome | |
| - name: Cache Next build | |
| id: next-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: frontend/.next/cache | |
| key: next-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'backend/pnpm-lock.yaml', 'frontend/pnpm-lock.yaml') }}-${{ hashFiles('frontend/**/*.{ts,tsx}') }} | |
| restore-keys: | | |
| next-${{ runner.os }}- | |
| - run: NODE_ENV=test pnpm run build-next --no-lint | |
| shell: bash | |
| - name: Install foreman | |
| run: gem install foreman | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'backend/pnpm-lock.yaml', 'frontend/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| playwright-${{ runner.os }}- | |
| - name: Install Playwright Browsers | |
| run: pnpm playwright install --with-deps chromium | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| - name: Run docker compose | |
| run: docker compose -f docker/docker-compose-local-linux.yml up -d | |
| - name: Run Playwright tests | |
| run: pnpm playwright test | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |