Working new CI flow with some updates. Testing if this will actually … #755
Workflow file for this run
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: Lucky CLI Main CI | ||
|
Check failure on line 1 in .github/workflows/ci.yml
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: "*" | ||
| env: | ||
| FORCE_COLOR: 1 | ||
| LUCKY_ENV: test | ||
| SHARDS_OVERRIDE: "$(pwd)/shard.override.yml" | ||
| jobs: | ||
| check_format: | ||
| strategy: | ||
| fail-fast: false | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: false | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: crystal-lang/install-crystal@v1 | ||
| with: | ||
| crystal: latest | ||
| - name: Install shards | ||
| run: shards install | ||
| - name: Format | ||
| run: crystal tool format --check | ||
| platform-specs: | ||
| needs: check_format | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - { os: macos-latest } | ||
| - { os: windows-latest } | ||
| - { os: ubuntu-latest } | ||
| runs-on: ${{matrix.os}} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: crystal-lang/install-crystal@v1 | ||
| with: | ||
| crystal: latest | ||
| - name: Install shards | ||
| run: shards install | ||
| - name: Run unit and integration specs | ||
| run: crystal spec spec/integration/ spec/unit/ | ||
| # NOTE: These e2e specs will take a while to run | ||
| browser_with_auth: | ||
| needs: [check_format, platform-specs] | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - { os: macos-latest } | ||
| - { os: windows-latest } | ||
| - { os: ubuntu-latest } | ||
| runs-on: ${{matrix.os}} | ||
| services: | ||
| postgres: | ||
| image: postgres:18-alpine | ||
| env: | ||
| POSTGRES_USER: postgres | ||
| POSTGRES_PASSWORD: postgres | ||
| ports: | ||
| - 5432:5432 | ||
| # needed because the postgres container does not provide a healthcheck | ||
| options: >- | ||
| --health-cmd pg_isready | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: crystal-lang/install-crystal@v1 | ||
| with: | ||
| crystal: latest | ||
| - name: Install shards | ||
| run: shards install --skip-postinstall --skip-executables | ||
| - name: Run e2e Browser app with authentication flow | ||
| run: crystal spec spec/end_to_end/browser_with_auth_spec.cr | ||
| browser_without_auth: | ||
| needs: [check_format, platform-specs] | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - { os: macos-latest } | ||
| - { os: windows-latest } | ||
| - { os: ubuntu-latest } | ||
| runs-on: ${{matrix.os}} | ||
| services: | ||
| postgres: | ||
| image: postgres:18-alpine | ||
| env: | ||
| POSTGRES_USER: postgres | ||
| POSTGRES_PASSWORD: postgres | ||
| ports: | ||
| - 5432:5432 | ||
| # needed because the postgres container does not provide a healthcheck | ||
| options: >- | ||
| --health-cmd pg_isready | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: crystal-lang/install-crystal@v1 | ||
| with: | ||
| crystal: latest | ||
| - name: Install shards | ||
| run: shards install --skip-postinstall --skip-executables | ||
| - name: Run e2e Browser app with authentication flow | ||
| run: crystal spec spec/end_to_end/browser_no_auth_spec.cr | ||