2020-10-21 07:38:50 +13:00
|
|
|
name: Elixir CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-10-21 14:52:28 +13:00
|
|
|
branches: [main]
|
2020-10-21 07:38:50 +13:00
|
|
|
tags-ignore: ["v*"]
|
|
|
|
pull_request:
|
2020-10-21 14:52:28 +13:00
|
|
|
branches: [main]
|
2020-10-21 07:38:50 +13:00
|
|
|
create:
|
2020-10-21 14:52:28 +13:00
|
|
|
branches: main
|
2020-10-21 07:38:50 +13:00
|
|
|
tags: ["v*"]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / Ash ${{matrix.ash}}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-23 11:31:31 +13:00
|
|
|
otp: ["23"]
|
|
|
|
elixir: ["1.11.0"]
|
2021-11-11 09:11:22 +13:00
|
|
|
ash: ["master", "1.50.1"]
|
2020-10-21 07:38:50 +13:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
ASH_VERSION: ${{matrix.ash}}
|
|
|
|
steps:
|
|
|
|
- run: sudo apt-get install --yes erlang-dev
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-23 10:39:23 +13:00
|
|
|
- uses: actions/setup-elixir@v1.5
|
2020-10-21 07:38:50 +13:00
|
|
|
with:
|
2021-03-23 10:39:23 +13:00
|
|
|
experimental-otp: true
|
2020-10-21 07:38:50 +13:00
|
|
|
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-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
|
|
|
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
id: cache-build
|
|
|
|
with:
|
|
|
|
path: _build
|
|
|
|
key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
|
|
|
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-
|
|
|
|
- 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"]
|
2021-01-23 11:31:31 +13:00
|
|
|
elixir: ["1.11.0"]
|
2020-10-21 07:38:50 +13:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- run: sudo apt-get install --yes erlang-dev
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-23 10:39:23 +13:00
|
|
|
- uses: actions/setup-elixir@v1.5
|
2020-10-21 07:38:50 +13:00
|
|
|
with:
|
2021-03-23 10:39:23 +13:00
|
|
|
experimental-otp: true
|
2020-10-21 07:38:50 +13:00
|
|
|
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 coveralls.github
|
|
|
|
release:
|
|
|
|
needs: [build]
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Release
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
otp: ["23"]
|
2021-01-23 11:31:31 +13:00
|
|
|
elixir: ["1.11.0"]
|
2020-10-21 07:38:50 +13:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- run: sudo apt-get install --yes erlang-dev
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-23 10:39:23 +13:00
|
|
|
- uses: actions/setup-elixir@v1.5
|
2020-10-21 07:38:50 +13:00
|
|
|
with:
|
2021-03-23 10:39:23 +13:00
|
|
|
experimental-otp: true
|
2020-10-21 07:38:50 +13:00
|
|
|
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 }}
|
2020-12-29 07:19:18 +13:00
|
|
|
- uses: little-core-labs/get-git-tag@v3.0.1
|
2020-10-21 07:38:50 +13:00
|
|
|
id: tagName
|
|
|
|
- uses: ethomson/send-tweet-action@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
with:
|
|
|
|
status: |
|
|
|
|
Alpha version "${{ steps.tagName.outputs.tag }}" of AshPhoenix released!
|
|
|
|
|
|
|
|
#myelixirstatus
|
|
|
|
|
|
|
|
See the changelog for more info:
|
2020-10-21 14:52:28 +13:00
|
|
|
https://github.com/ash-project/ash_phoenix/blob/main/CHANGELOG.md
|
2020-10-21 07:38:50 +13:00
|
|
|
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 }}
|