v1.1.0 #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
on: | |
push: | |
branches: ["*"] | |
tags: ["v*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
test: | |
name: test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: "22.x" | |
elixir: "1.11.x" | |
- otp: "23.x" | |
elixir: "1.12.x" | |
- otp: "24.x" | |
elixir: "1.13.x" | |
- otp: "25.x" | |
elixir: "1.14.x" | |
- otp: "25.x" | |
elixir: "1.15.x" | |
- otp: "26.x" | |
elixir: "1.16.x" | |
- otp: "27.x" | |
elixir: "1.17.x" | |
runs-on: ubuntu-20.04 | |
env: | |
MIX_ENV: test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "${{matrix.otp}}" | |
elixir-version: "${{matrix.elixir}}" | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Check Formatting | |
run: mix format | |
- name: Compile | |
run: mix compile --warnings-as-errors | |
- name: Run Tests | |
run: mix coveralls.json | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: cover/excoveralls.json | |
checks: | |
name: static checks | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- otp: "27.x" | |
elixir: "1.17.x" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "${{matrix.otp}}" | |
elixir-version: "${{matrix.elixir}}" | |
- name: Cache multiple paths | |
uses: actions/cache@v3 | |
with: | |
path: priv/plts | |
key: v1-${{hashFiles('mix.*')}}-${{matrix.otp}}-${{matrix.elixir}} | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Run checks | |
run: mix check | |
docs: | |
name: docs | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- otp: "27.x" | |
elixir: "1.17.x" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "${{matrix.otp}}" | |
elixir-version: "${{matrix.elixir}}" | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Generate docs | |
run: | | |
mix docs | |
test -f doc/index.html && echo "doc/index.html exists." | |
test -f doc/hush_aws_secrets_manager.epub && echo "doc/hush_aws_secrets_manager.epub exists." | |
release: | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
name: release | |
strategy: | |
matrix: | |
include: | |
- otp: "27.x" | |
elixir: "1.17.x" | |
runs-on: ubuntu-20.04 | |
needs: [test, checks, docs] | |
env: | |
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "${{matrix.otp}}" | |
elixir-version: "${{matrix.elixir}}" | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Release | |
run: mix hex.publish --yes |