Beta 1 release #137
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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| unit-tests: | |
| name: Unit tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }}) | |
| runs-on: ubuntu-24.04 | |
| env: | |
| MIX_ENV: test | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.17.3 | |
| otp: 26.2.5.2 | |
| coveralls: false | |
| - elixir: 1.18.4 | |
| otp: 27.3 | |
| coveralls: true | |
| - elixir: 1.18.4 | |
| otp: 28.0.1 | |
| coveralls: false | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Restore dependencies cache | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 | |
| with: | |
| node-version: "24" | |
| cache: npm | |
| cache-dependency-path: package.json | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Check JavaScript (prettier + eslint) | |
| run: npm run check | |
| - name: Run tests and post coverage to Coveralls | |
| if: matrix.coveralls | |
| run: mix coveralls.github | |
| - name: Run tests | |
| if: ${{ !matrix.coveralls }} | |
| run: mix test | |
| e2e-tests: | |
| name: E2E tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.17.3 | |
| otp: 26.2.5.2 | |
| - elixir: 1.18.4 | |
| otp: 27.3 | |
| - elixir: 1.18.4 | |
| otp: 28.0.1 | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: e2e_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Restore E2E dependencies cache | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 | |
| with: | |
| path: | | |
| e2e/deps | |
| e2e/_build | |
| key: deps-e2e-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('e2e/mix.lock') }} | |
| restore-keys: | | |
| deps-e2e-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
| - name: Install E2E dependencies | |
| working-directory: e2e | |
| run: mix deps.get | |
| env: | |
| MIX_ENV: test | |
| - name: Setup database | |
| working-directory: e2e | |
| run: mix ecto.setup | |
| env: | |
| MIX_ENV: test | |
| - name: Run E2E tests | |
| working-directory: e2e | |
| run: mix test | |
| env: | |
| MIX_ENV: test | |
| installer-tests: | |
| name: Installer tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.17.3 | |
| otp: 26.2.5.2 | |
| - elixir: 1.18.4 | |
| otp: 27.3 | |
| - elixir: 1.18.4 | |
| otp: 28.0.1 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Restore installer dependencies cache | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 | |
| with: | |
| path: | | |
| installer/deps | |
| installer/_build | |
| key: deps-installer-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('installer/mix.lock') }} | |
| restore-keys: | | |
| deps-installer-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
| - name: Install installer dependencies | |
| working-directory: installer | |
| run: mix deps.get | |
| - name: Run installer tests | |
| working-directory: installer | |
| run: mix test | |
| integration-tests: | |
| name: Integration tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - elixir: 1.17.3 | |
| otp: 26.2.5.2 | |
| - elixir: 1.18.4 | |
| otp: 27.3 | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4 | |
| with: | |
| elixir-version: ${{ matrix.elixir }} | |
| otp-version: ${{ matrix.otp }} | |
| - name: Restore integration test dependencies cache | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 | |
| with: | |
| path: | | |
| integration_test/deps | |
| integration_test/_build | |
| key: deps-integration-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('integration_test/mix.lock') }} | |
| restore-keys: | | |
| deps-integration-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
| - name: Install integration test dependencies | |
| working-directory: integration_test | |
| run: mix deps.get | |
| - name: Install installer dependencies and local corex_new archive | |
| working-directory: installer | |
| run: | | |
| mix deps.get | |
| mix archive.build -o corex_new.ez | |
| mix archive.install corex_new.ez --force | |
| - name: Install Mix archives for corex.new (phx.new + igniter.install) | |
| run: | | |
| mix archive.install hex phx_new --force | |
| mix archive.install hex igniter_new --force | |
| - name: Run integration tests | |
| working-directory: integration_test | |
| run: mix test test/code_generation/dev_corex_new_test.exs --timeout 600000 |