From 3b19e1ef1cce91277e4ca7f3686388493d91968a Mon Sep 17 00:00:00 2001 From: Joel Kociolek Date: Wed, 15 May 2024 17:51:16 +0300 Subject: [PATCH] ci: try to make ci work try 7... --- .github/workflows/ash-ci.yml | 350 +++++++++++++++++------------------ 1 file changed, 175 insertions(+), 175 deletions(-) diff --git a/.github/workflows/ash-ci.yml b/.github/workflows/ash-ci.yml index 912194a..6cc6a1b 100644 --- a/.github/workflows/ash-ci.yml +++ b/.github/workflows/ash-ci.yml @@ -1,51 +1,51 @@ name: Ash CI on: -workflow_call: - secrets: - HEX_API_KEY: - required: false - inputs: - spark-formatter: - type: boolean - default: true - spark-cheat-sheets: - type: boolean - default: true - sobelow: - type: boolean - default: true - postgres: - type: boolean - default: false - ash_postgres: - type: boolean - default: true - ecto_postgres: - type: boolean - default: false - postgres-version: - type: string - default: "14" - sqlite: - type: boolean - default: false - mysql: - type: boolean - default: false - ash_mysql: - type: boolean - default: true - ecto_mysql: - type: boolean - default: false - mysql-version: - type: string - default: "8.0" - hex-api-key: - type: string - sat-solver: - type: string - default: "Picosat" + workflow_call: + secrets: + HEX_API_KEY: + required: false + inputs: + spark-formatter: + type: boolean + default: true + spark-cheat-sheets: + type: boolean + default: true + sobelow: + type: boolean + default: true + postgres: + type: boolean + default: false + ash_postgres: + type: boolean + default: true + ecto_postgres: + type: boolean + default: false + postgres-version: + type: string + default: "14" + sqlite: + type: boolean + default: false + mysql: + type: boolean + default: false + ash_mysql: + type: boolean + default: true + ecto_mysql: + type: boolean + default: false + mysql-version: + type: string + default: "8.0" + hex-api-key: + type: string + sat-solver: + type: string + default: "Picosat" env: PG_VERSION: ${{inputs.postgres-version}} MYSQL_VERSION: ${{inputs.mysql-version}} @@ -181,11 +181,11 @@ jobs: POSTGRES_HOST_AUTH_METHOD: trust options: >- --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 mysql: image: mysql:${{inputs.mysql-version}} env: @@ -197,129 +197,129 @@ jobs: --health-retries 5 ports: - 3306:3306 - steps: - - uses: actions/checkout@v3 - - uses: team-alembic/staple-actions/actions/mix-task@main - if: ${{inputs.postgres && inputs.ash_postgres}} - with: - mix-env: test - task: ash_postgres.generate_migrations --check - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_postgres.create - if: ${{inputs.postgres && inputs.ash_postgres}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ecto.create - if: ${{inputs.postgres && inputs.ecto_postgres}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_postgres.migrate - if: ${{inputs.postgres && inputs.ash_postgres}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_postgres.migrate --tenants - if: ${{inputs.postgres && inputs.ash_postgres}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ecto.migrate - if: ${{inputs.postgres && inputs.ecto_postgres}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_sqlite.generate_migrations --check - if: ${{inputs.sqlite}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_sqlite.create - if: ${{inputs.sqlite}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_sqlite.migrate - if: ${{inputs.sqlite}} - - uses: team-alembic/staple-actions/actions/mix-task@main - if: ${{inputs.mysql && inputs.ash_mysql}} - with: - mix-env: test - task: ash_mysql.generate_migrations --check - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_mysql.create - if: ${{inputs.mysql && inputs.ash_mysql}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ecto.create - if: ${{inputs.mysql && inputs.ecto_mysql}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_mysql.migrate - if: ${{inputs.mysql && inputs.ash_mysql}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ash_mysql.migrate --tenants - if: ${{inputs.mysql && inputs.ash_mysql}} - - uses: team-alembic/staple-actions/actions/mix-task@main - with: - mix-env: test - task: ecto.migrate - if: ${{inputs.mysql && inputs.ecto_mysql}} - - uses: team-alembic/staple-actions/actions/mix-test@main - with: - mix-env: test - env: - PGUSER: postgres - PGPASS: postgres - PGHOST: postgres + steps: + - uses: actions/checkout@v3 + - uses: team-alembic/staple-actions/actions/mix-task@main + if: ${{inputs.postgres && inputs.ash_postgres}} + with: + mix-env: test + task: ash_postgres.generate_migrations --check + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_postgres.create + if: ${{inputs.postgres && inputs.ash_postgres}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ecto.create + if: ${{inputs.postgres && inputs.ecto_postgres}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_postgres.migrate + if: ${{inputs.postgres && inputs.ash_postgres}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_postgres.migrate --tenants + if: ${{inputs.postgres && inputs.ash_postgres}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ecto.migrate + if: ${{inputs.postgres && inputs.ecto_postgres}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_sqlite.generate_migrations --check + if: ${{inputs.sqlite}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_sqlite.create + if: ${{inputs.sqlite}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_sqlite.migrate + if: ${{inputs.sqlite}} + - uses: team-alembic/staple-actions/actions/mix-task@main + if: ${{inputs.mysql && inputs.ash_mysql}} + with: + mix-env: test + task: ash_mysql.generate_migrations --check + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_mysql.create + if: ${{inputs.mysql && inputs.ash_mysql}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ecto.create + if: ${{inputs.mysql && inputs.ecto_mysql}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_mysql.migrate + if: ${{inputs.mysql && inputs.ash_mysql}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_mysql.migrate --tenants + if: ${{inputs.mysql && inputs.ash_mysql}} + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ecto.migrate + if: ${{inputs.mysql && inputs.ecto_mysql}} + - uses: team-alembic/staple-actions/actions/mix-test@main + with: + mix-env: test + env: + PGUSER: postgres + PGPASS: postgres + PGHOST: postgres - dialyzer: - name: mix dialyzer - runs-on: ubuntu-latest - needs: build-test - steps: - - uses: actions/checkout@v3 - - uses: team-alembic/staple-actions/actions/mix-dialyzer@main - with: - mix-env: dev + dialyzer: + name: mix dialyzer + runs-on: ubuntu-latest + needs: build-test + steps: + - uses: actions/checkout@v3 + - uses: team-alembic/staple-actions/actions/mix-dialyzer@main + with: + mix-env: dev - build-dev: - name: MIX_ENV=dev mix.compile - runs-on: ubuntu-latest - needs: deps - steps: - - uses: actions/checkout@v3 - - uses: team-alembic/staple-actions/actions/mix-compile@main - with: - mix-env: dev - release: - needs: - - credo - - unused-deps - - spark-formatter - - spark-cheat-sheets - - sobelow - - formatter - - auditor - - test - - dialyzer - - build-dev - - deps - if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest - name: Release - steps: - - uses: actions/checkout@v3 - - uses: team-alembic/staple-actions/actions/mix-hex-publish@main - with: - mix-env: dev - hex-api-key: ${{secrets.HEX_API_KEY}} + build-dev: + name: MIX_ENV=dev mix.compile + runs-on: ubuntu-latest + needs: deps + steps: + - uses: actions/checkout@v3 + - uses: team-alembic/staple-actions/actions/mix-compile@main + with: + mix-env: dev + release: + needs: + - credo + - unused-deps + - spark-formatter + - spark-cheat-sheets + - sobelow + - formatter + - auditor + - test + - dialyzer + - build-dev + - deps + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + name: Release + steps: + - uses: actions/checkout@v3 + - uses: team-alembic/staple-actions/actions/mix-hex-publish@main + with: + mix-env: dev + hex-api-key: ${{secrets.HEX_API_KEY}}