diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 3c04ed9..6444436 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -1,94 +1,10 @@ -name: Ash CI - +name: CI on: push: + tags: + - "v*" branches: [main] - tags-ignore: ["v*"] - pull_request: - branches: [main] - create: - tags: ["v*"] - branches: main + workflow_call: jobs: - build: - runs-on: ubuntu-latest - name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / Ash ${{matrix.ash}} - strategy: - fail-fast: false - matrix: - otp: ["25"] - elixir: ["1.14.0"] - ash: ["main", "2.4.30"] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ASH_VERSION: ${{matrix.ash}} - steps: - - run: sudo apt-get install --yes erlang-dev - - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 - with: - otp-version: ${{matrix.otp}} - elixir-version: ${{matrix.elixir}} - - uses: actions/cache@v1 - id: cache-deps - with: - path: deps - key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2- - - uses: actions/cache@v1 - id: cache-build - with: - path: _build - key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-2- - - run: mix deps.get - - run: mix check --except dialyzer - if: startsWith(github.ref, 'refs/tags/v') - - run: mix check - if: "!startsWith(github.ref, 'refs/tags/v')" - release: - needs: [build] - if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest - name: Release - strategy: - matrix: - otp: ["25"] - elixir: ["1.13.2"] - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - run: sudo apt-get install --yes erlang-dev - - uses: actions/checkout@v2 - - uses: erlef/setup-elixir@v1 - with: - otp-version: ${{matrix.otp}} - elixir-version: ${{matrix.elixir}} - - uses: actions/cache@v1 - id: cache-deps - with: - path: deps - key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2- - - run: mix deps.get - - run: mix compile - - run: mix hex.publish --yes - if: startsWith(github.ref, 'refs/tags/v') - env: - HEX_API_KEY: ${{ secrets.HEX_API_KEY }} - - uses: little-core-labs/get-git-tag@v3.0.1 - id: tagName - - uses: ethomson/send-tweet-action@v1 - if: startsWith(github.ref, 'refs/tags/v') - with: - status: | - AshGraphql version "${{ steps.tagName.outputs.tag }}" released! - - #myelixirstatus - - See the changelog for more info: - https://github.com/ash-project/ash_graphql/blob/main/CHANGELOG.md - consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }} - consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} - access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }} - access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + ash-ci: + uses: ash-project/ash/.github/workflows/ash-ci.yml@main diff --git a/mix.exs b/mix.exs index 5a234e4..256b994 100644 --- a/mix.exs +++ b/mix.exs @@ -139,12 +139,12 @@ defmodule AshGraphql.MixProject do {:absinthe, "~> 1.7"}, {:dataloader, "~> 1.0"}, {:jason, "~> 1.2"}, - {:ex_doc, "~> 0.22", only: :dev, runtime: false}, - {:ex_check, "~> 0.12.0", only: :dev}, - {:credo, ">= 0.0.0", only: :dev, runtime: false}, - {:dialyxir, ">= 0.0.0", only: :dev, runtime: false}, - {:sobelow, ">= 0.0.0", only: :dev, runtime: false}, - {:git_ops, "~> 2.5.1", only: :dev}, + {:ex_doc, "~> 0.22", only: [:dev, :test], runtime: false}, + {:ex_check, "~> 0.12.0", only: [:dev, :test]}, + {:credo, ">= 0.0.0", only: [:dev, :test], runtime: false}, + {:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false}, + {:sobelow, ">= 0.0.0", only: [:dev, :test], runtime: false}, + {:git_ops, "~> 2.5.1", only: [:dev, :test]}, {:excoveralls, "~> 0.13.0", only: [:dev, :test]} ] end