-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump apps version in GitHub CI #166
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,7 @@ on: | |
|
||
jobs: | ||
test: | ||
name: Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}} | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
postgres: | ||
|
@@ -21,34 +20,37 @@ jobs: | |
POSTGRES_PASSWORD: postgres | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
elixir: | ||
- '1.13' | ||
- '1.14' | ||
otp: | ||
- '24' | ||
- '25' | ||
include: | ||
- pair: | ||
elixir: 1.11.4 | ||
otp: 22.3 | ||
- pair: | ||
elixir: 1.15.7 | ||
otp: 26.1 | ||
lint: lint | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
elixir-version: ${{ matrix.pair.elixir }} | ||
otp-version: ${{ matrix.pair.otp }} | ||
|
||
- name: Restore deps cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-git-${{ github.sha }} | ||
key: deps-${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-${{ hashFiles('**/mix.lock') }}-git-${{ github.sha }} | ||
restore-keys: | | ||
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | ||
deps-${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
deps-${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }} | ||
|
||
- name: Create dializer plts path | ||
run: mkdir -p priv/plts | ||
|
@@ -57,21 +59,32 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: priv/plts | ||
key: plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} | ||
key: plts-${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} | ||
restore-keys: | | ||
plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
plts-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | ||
plts-${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
plts-${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }} | ||
|
||
- name: Install package dependencies | ||
run: mix deps.get | ||
|
||
- name: Check code format | ||
run: mix format --check-formatted | ||
if: ${{ matrix.lint }} | ||
|
||
- name: Check unused deps | ||
run: mix deps.unlock --check-unused | ||
if: ${{ matrix.lint }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
- name: Compile dependencies | ||
run: mix compile | ||
run: mix deps.compile | ||
env: | ||
MIX_ENV: test | ||
|
||
- name: Compile app | ||
run: mix compile --warnings-as-errors | ||
env: | ||
MIX_ENV: test | ||
if: ${{ matrix.lint }} | ||
|
||
- name: Run unit tests | ||
run: | | ||
|
@@ -82,3 +95,4 @@ jobs: | |
|
||
- name: Run dialyzer | ||
run: mix dialyzer | ||
if: ${{ matrix.lint }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
elixir 1.14.1-otp-24 1.12.0-otp-24 | ||
erlang 24.1.7 24.1.5 24.1.2 24.1.1 24.0 | ||
elixir 1.15.7-otp-26 | ||
erlang 26.1.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ Make sure the tests pass. | |
|
||
Running tests for Dataloader requires a running instance of Postgres. The easiest way to do this is to run Postgres inside of Docker whilst running the Dataloader tests. In one terminal run: | ||
|
||
docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=dataloader_test postgres | ||
docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=dataloader_test docker.io/postgres | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
and in another terminal run: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,13 +394,13 @@ defmodule Dataloader do | |
# Optionally use `async/1` and `async_stream/3` functions from | ||
# `opentelemetry_process_propagator` if available | ||
if Code.ensure_loaded?(OpentelemetryProcessPropagator.Task) do | ||
@spec async((() -> any)) :: Task.t() | ||
@spec async((-> any)) :: Task.t() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
defdelegate async(fun), to: OpentelemetryProcessPropagator.Task | ||
|
||
@spec async_stream(Enumerable.t(), (term -> term), keyword) :: Enumerable.t() | ||
defdelegate async_stream(items, fun, opts), to: OpentelemetryProcessPropagator.Task | ||
else | ||
@spec async((() -> any)) :: Task.t() | ||
@spec async((-> any)) :: Task.t() | ||
defdelegate async(fun), to: Task | ||
|
||
@spec async_stream(Enumerable.t(), (term -> term), keyword) :: Enumerable.t() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ defmodule Dataloader.Mixfile do | |
[ | ||
app: :dataloader, | ||
version: @version, | ||
elixir: "~> 1.12", | ||
elixir: "~> 1.11", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now, the minimum supported Elixir version with security patches is 1.11, see https://hexdocs.pm/elixir/1.15.7/compatibility-and-deprecations.html |
||
start_permanent: Mix.env() == :prod, | ||
elixirc_paths: elixirc_paths(Mix.env()), | ||
package: package(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to show the
lint
flag in job name.