Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 16 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Elixir CI Checks

env:
DEBIAN_FRONTEND: noninteractive
DEPENDENCY_FILE: mix.lock
Expand All @@ -10,11 +9,9 @@ env:
REPOSITORY: grpc
RUNNER_OS: ubuntu20 # Must match Elixir/OTP version in described in action erlef/setup-beam@v1
SHA: ${{ github.sha }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
Expand All @@ -24,11 +21,10 @@ on:
- synchronize
- opened
- reopened

jobs:
static:
name: Static Checks (Elixir ${{ matrix.elixir }} & OTP ${{ matrix.otp }})
runs-on: runs-on,runner=2cpu-linux-x64
runs-on: "runs-on/runner=2cpu-linux-x64/run-id=${{ github.run_id }}"
outputs:
HASH: ${{ steps.hash.outputs.HASH }}
strategy:
Expand Down Expand Up @@ -99,7 +95,7 @@ jobs:
mix hex.publish --dry-run
test:
name: Unit Tests (Elixir ${{ matrix.elixir }} & OTP ${{ matrix.otp }})
runs-on: runs-on,runner=2cpu-linux-x64
runs-on: "runs-on/runner=2cpu-linux-x64/run-id=${{ github.run_id }}"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -165,7 +161,7 @@ jobs:
permit:
name: Permit Package Publishing
needs: [static, test]
runs-on: runs-on,runner=1cpu-linux-x64
runs-on: "runs-on/runner=1cpu-linux-x64/run-id=${{ github.run_id }}"
outputs:
PUBLISH: ${{ steps.version.outputs.PUBLISH }}
steps:
Expand Down Expand Up @@ -211,11 +207,10 @@ jobs:
with:
path: approval.txt
key: ${{ runner.os }}-${{ env.REPOSITORY }}-approval-${{ needs.static.outputs.HASH }}

publish:
name: Publish Hex Package
needs: [permit]
runs-on: runs-on,runner=2cpu-linux-x64
runs-on: "runs-on/runner=2cpu-linux-x64/run-id=${{ github.run_id }}"
if: needs.permit.outputs.PUBLISH == 'true' && github.event_name == 'push'
steps:
- name: Checkout latest codebase
Expand Down Expand Up @@ -247,27 +242,24 @@ jobs:
run: |
echo "Publishing package"
mix hex.publish --yes


interop-tests:
runs-on: runs-on,runner=2cpu-linux-x64
runs-on: "runs-on/runner=2cpu-linux-x64/run-id=${{ github.run_id }}"
name: Interop tests
container:
image: elixir:1.10-slim
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
working-directory: ./interop
- name: Run interop tests
run: mix run script/run.exs
working-directory: ./interop

- uses: actions/checkout@v4
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
working-directory: ./interop
- name: Run interop tests
run: mix run script/run.exs
working-directory: ./interop
check_release:
runs-on: runs-on,runner=2cpu-linux-x64
runs-on: "runs-on/runner=2cpu-linux-x64/run-id=${{ github.run_id }}"
name: Check release
container:
image: elixir:1.10-slim
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/dev-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Elixir Dev Publish

env:
DEBIAN_FRONTEND: noninteractive
DEPENDENCY_FILE: mix.lock
Expand All @@ -10,19 +9,16 @@ env:
REPOSITORY: grpc
RUNNER_OS: ubuntu20 # Must match Elixir/OTP version in described in action erlef/setup-beam@v1
SHA: ${{ github.sha }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs: {}

jobs:
dev-publish:
name: Dev Publish
runs-on: runs-on,runner=4cpu-linux-x64
runs-on: "runs-on/runner=4cpu-linux-x64/run-id=${{ github.run_id }}"
steps:
- name: Checkout latest codebase
uses: actions/checkout@v4
Expand Down Expand Up @@ -71,6 +67,6 @@ jobs:
shell: bash
env:
HEX_API_KEY: ${{ secrets.HEX_ORGANIZATION_WRITE_KEY }}
run: |
run: |-
echo "Publishing dev package"
mix hex.publish --yes
mix hex.publish --yes
Loading