mirror of
https://github.com/ash-project/ash_admin.git
synced 2024-09-19 12:53:28 +12:00
chore: upgrade to new ci patterns
This commit is contained in:
parent
3002af9ec6
commit
ecc4d93867
3 changed files with 9 additions and 115 deletions
120
.github/workflows/elixir.yml
vendored
120
.github/workflows/elixir.yml
vendored
|
@ -1,119 +1,11 @@
|
|||
name: Elixir CI
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
branches: [main]
|
||||
tags-ignore: ["v*"]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
create:
|
||||
branches: main
|
||||
tags: ["v*"]
|
||||
workflow_call:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / Ash ${{matrix.ash}}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
otp: ["23"]
|
||||
elixir: ["1.13.1"]
|
||||
ash: ["main", "2.4.2"]
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ASH_VERSION: ${{matrix.ash}}
|
||||
steps:
|
||||
- run: sudo apt-get install --yes erlang-dev inotify-tools
|
||||
- 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}}-deps2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
||||
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps2-
|
||||
- uses: actions/cache@v1
|
||||
id: cache-build
|
||||
with:
|
||||
path: _build
|
||||
key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
||||
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build2-
|
||||
- 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')"
|
||||
coverage:
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
name: Report Test Coverage
|
||||
strategy:
|
||||
matrix:
|
||||
otp: ["23"]
|
||||
elixir: ["1.13.1"]
|
||||
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-3-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
||||
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-3-
|
||||
- run: mix deps.get
|
||||
- run: mix coveralls.github
|
||||
release:
|
||||
needs: [build]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
name: Release
|
||||
strategy:
|
||||
matrix:
|
||||
otp: ["23"]
|
||||
elixir: ["1.13.1"]
|
||||
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-3-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
||||
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-3-
|
||||
- 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: |
|
||||
AshAdmin version "${{ steps.tagName.outputs.tag }}" released!
|
||||
|
||||
#myelixirstatus
|
||||
|
||||
See the changelog for more info:
|
||||
https://github.com/ash-project/ash_admin/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
|
||||
|
|
2
.tool-versions
Normal file
2
.tool-versions
Normal file
|
@ -0,0 +1,2 @@
|
|||
erlang 25.2.2
|
||||
elixir 1.14.3
|
2
mix.exs
2
mix.exs
|
@ -110,7 +110,7 @@ defmodule AshAdmin.MixProject do
|
|||
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
|
||||
{:sobelow, ">= 0.0.0", only: [:dev, :test], runtime: false},
|
||||
{:excoveralls, "~> 0.14", only: [:dev, :test]},
|
||||
{:floki, ">= 0.30.0", only: :test}
|
||||
{:floki, ">= 0.30.0", only: [:dev, :test]}
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue