Requested changes #41
Workflow file for this run
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: push | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Protobuf lint | |
container: | |
image: bufbuild/buf:1.23.1 | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: lint | |
run: buf lint | |
- name: format | |
run: buf format --exit-code | |
fishjam_protos_lint: | |
runs-on: ubuntu-latest | |
name: CI elixir lint | |
strategy: | |
matrix: | |
otp: ['27'] | |
elixir: ['1.17'] | |
steps: | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
working-directory: fishjam_protos | |
run: mix deps.get | |
- name: Compile without warnings | |
working-directory: fishjam_protos | |
id: compile | |
run: mix compile --warnings-as-errors | |
- name: Check formatting | |
working-directory: fishjam_protos | |
if: ${{ !cancelled() && steps.compile.outcome == 'success' }} | |
run: mix format --check-formatted | |
check-protobufs-update: | |
runs-on: ubuntu-latest | |
name: Fishjam protos update | |
strategy: | |
matrix: | |
otp: ['27'] | |
elixir: ['1.17'] | |
steps: | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install protobuf compiler (protoc) if needed | |
run: | | |
sudo apt update | |
sudo apt install -y protobuf-compiler | |
PATH=~/.mix/escripts:$PATH | |
mix deps.get | |
mix escript.install hex protobuf --force | |
working-directory: fishjam_protos | |
- name: Run compile_proto.sh | |
run: bash compile_proto.sh | |
working-directory: fishjam_protos | |
- name: Check for changes in protobuf files | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "Generated protobuf files are not up to date. Please regenerate them and commit the changes." | |
git diff | |
exit 1 | |
fi |