From 5f340e67af16c1b17150b50aa109a3c8e270b8c5 Mon Sep 17 00:00:00 2001 From: James Harton Date: Fri, 22 Sep 2023 10:26:58 +1200 Subject: [PATCH] chore: Add extra checks in the CI pipeline. --- .check.exs | 3 ++- .github/workflows/elixir_lib.yml | 32 +++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.check.exs b/.check.exs index eee48c9e..b8b129fe 100644 --- a/.check.exs +++ b/.check.exs @@ -30,6 +30,7 @@ # {:my_tool, ["my_tool", "arg with spaces"]} {:credo, "mix credo --strict"}, {:spark_formatter, "mix spark.formatter --check"}, - {:spark_cheat_sheets, "mix spark.cheat_sheets --check"} + {:spark_cheat_sheets, "mix spark.cheat_sheets --check"}, + {:generate_migrations, "mix ash_postgres.generate_migrations --check"} ] ] diff --git a/.github/workflows/elixir_lib.yml b/.github/workflows/elixir_lib.yml index 1a08b39d..0de26267 100644 --- a/.github/workflows/elixir_lib.yml +++ b/.github/workflows/elixir_lib.yml @@ -107,7 +107,7 @@ jobs: with: mix-env: test - conventional_commit: + conventional-commit: name: mix git_ops.check_message runs-on: ubuntu-latest needs: build-test @@ -116,6 +116,7 @@ jobs: - uses: team-alembic/staple-actions/actions/conventional-commit@main with: mix-env: test + sobelow: name: mix sobelow --config runs-on: ubuntu-latest @@ -126,7 +127,7 @@ jobs: with: mix-env: test - unused_deps: + unused-deps: name: mix deps.unlock --check-unused runs-on: ubuntu-latest needs: build-test @@ -136,6 +137,28 @@ jobs: with: mix-env: test + spark-cheat-sheets: + name: mix spark.cheat_sheets --check + runs-on: ubuntu-latest + needs: build-test + steps: + - uses: actions/checkout@v3 + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: spark.cheat_sheets --check + + generate-migrations: + name: mix ash_postgres.generate_migrations --check + runs-on: ubuntu-latest + needs: build-test + steps: + - uses: actions/checkout@v3 + - uses: team-alembic/staple-actions/actions/mix-task@main + with: + mix-env: test + task: ash_postgres.generate_migrations --check + build-dev: name: MIX_ENV=dev mix.compile runs-on: ubuntu-latest @@ -148,7 +171,10 @@ jobs: - test - dialyzer - sobelow - - unused_deps + - unused-deps + - spark-cheat-sheets + - generate-migrations + - conventional-commit if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} steps: - uses: actions/checkout@v3