Update version to 1.0.0 (#27) #77
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 | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- pair: | |
elixir: 1.14.0 | |
otp: 24.0 | |
lint: lint | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.pair.otp}} | |
elixir-version: ${{matrix.pair.elixir}} | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- run: mix deps.get | |
- run: mix format --check-formatted | |
if: ${{ matrix.lint }} | |
- run: mix deps.unlock --check-unused | |
if: ${{ matrix.lint }} | |
- run: mix deps.compile | |
- run: mix compile --warnings-as-errors | |
if: ${{ matrix.lint }} | |
- run: mix deps.get | |
- run: make run-tests | |
protobuf: | |
name: "Generate Protobufs" | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- pair: | |
elixir: 1.14.0 | |
otp: 24.0 | |
lint: lint | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.pair.otp}} | |
elixir-version: ${{matrix.pair.elixir}} | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- uses: "arduino/setup-protoc@v1" | |
with: | |
version: "3.19.4" | |
- name: "Install Homebrew & gRPC" | |
run: | | |
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bash_profile | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
brew install grpc protobuf | |
- name: "Install protoc_gen_elixir plugin" | |
run: | | |
mix escript.install hex protobuf --force | |
echo "/home/runner/.mix/escripts" >> $GITHUB_PATH | |
- uses: "bufbuild/buf-setup-action@v1.29.0" | |
- name: "Generate & Diff Protos" | |
run: | | |
echo "/home/runner/.mix/escripts" >> $GITHUB_PATH | |
./buf.gen.yaml | |
mix format authzed/**/*.ex | |
bash -c '[[ $(diff -qr authzed/api lib/api | grep "Only in authzed") -eq 0 ]]' | |
mix format | |
rm -rf authzed |