ash_csv/.github/workflows/elixir.yml

119 lines
3.9 KiB
YAML
Raw Normal View History

2020-08-20 16:51:23 +12:00
name: Ash CI
on:
push:
branches: [master]
tags-ignore: ["v*"]
pull_request:
branches: [master]
create:
tags: ["v*"]
jobs:
build:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / Ash ${{matrix.ash}}
2020-08-20 16:51:23 +12:00
strategy:
fail-fast: false
2020-08-20 16:51:23 +12:00
matrix:
otp: ["23", "22"]
2020-08-20 16:51:23 +12:00
elixir: ["1.10.0"]
ash: ["master", "1.11.0", "1.10.0"]
2020-08-20 16:51:23 +12:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASH_VERSION: ${{matrix.ash}}
2020-08-20 16:51:23 +12:00
steps:
- run: sudo apt-get install --yes erlang-dev
- uses: actions/checkout@v2
- uses: actions/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')"
2020-08-28 14:50:50 +12:00
coverage:
needs: [build]
runs-on: ubuntu-latest
name: Report Test Coverage
strategy:
matrix:
otp: ["23"]
elixir: ["1.10.0"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: sudo apt-get install --yes erlang-dev
- uses: actions/checkout@v2
- uses: actions/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 coveralls.github
release:
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
name: Release
strategy:
matrix:
otp: ["23"]
elixir: ["1.10.0"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: sudo apt-get install --yes erlang-dev
- uses: actions/checkout@v2
- uses: actions/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
2020-08-20 16:51:23 +12:00
- run: mix hex.publish --yes
if: startsWith(github.ref, 'refs/tags/v')
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
- uses: olegtarasov/get-tag@v2
id: tagName
- uses: ethomson/send-tweet-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
status: |
Alpha version "${{ steps.tagName.outputs.tag }}" of Ash CSV released!
#myelixirstatus
See the changelog for more info:
https://github.com/ash-project/ash_csv/blob/master/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 }}