mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
Add Erlang 24 to README and some more info on version matching (#45)
This commit is contained in:
committed by
GitHub
parent
31cf3db78c
commit
e6db7bde79
+1
-1
@@ -209,7 +209,7 @@ THE SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: ansi-regex, ansi-styles, callsites, chalk, has-flag, is-fullwidth-code-point, parent-module, path-key, resolve-from, shebang-regex, string-width, strip-ansi, supports-color, type-fest. A copy of the source code may be downloaded from https://github.com/chalk/ansi-regex.git (ansi-regex), https://github.com/chalk/ansi-styles.git (ansi-styles), https://github.com/sindresorhus/callsites.git (callsites), https://github.com/chalk/chalk.git (chalk), https://github.com/sindresorhus/has-flag.git (has-flag), https://github.com/sindresorhus/is-fullwidth-code-point.git (is-fullwidth-code-point), https://github.com/sindresorhus/parent-module.git (parent-module), https://github.com/sindresorhus/path-key.git (path-key), https://github.com/sindresorhus/resolve-from.git (resolve-from), https://github.com/sindresorhus/shebang-regex.git (shebang-regex), https://github.com/sindresorhus/string-width.git (string-width), https://github.com/chalk/strip-ansi.git (strip-ansi), https://github.com/chalk/supports-color.git (supports-color), https://github.com/sindresorhus/type-fest.git (type-fest). This software contains the following license and notice below:
|
||||
The following software may be included in this product: ansi-regex, ansi-styles, callsites, chalk, has-flag, is-fullwidth-code-point, parent-module, path-key, resolve-from, shebang-regex, string-width, strip-ansi, supports-color. A copy of the source code may be downloaded from https://github.com/chalk/ansi-regex.git (ansi-regex), https://github.com/chalk/ansi-styles.git (ansi-styles), https://github.com/sindresorhus/callsites.git (callsites), https://github.com/chalk/chalk.git (chalk), https://github.com/sindresorhus/has-flag.git (has-flag), https://github.com/sindresorhus/is-fullwidth-code-point.git (is-fullwidth-code-point), https://github.com/sindresorhus/parent-module.git (parent-module), https://github.com/sindresorhus/path-key.git (path-key), https://github.com/sindresorhus/resolve-from.git (resolve-from), https://github.com/sindresorhus/shebang-regex.git (shebang-regex), https://github.com/sindresorhus/string-width.git (string-width), https://github.com/chalk/strip-ansi.git (strip-ansi), https://github.com/chalk/supports-color.git (supports-color). This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
||||
|
||||
@@ -12,18 +12,19 @@ workflow by:
|
||||
- installing Erlang/OTP
|
||||
- optionally, installing Elixir
|
||||
- optionally, installing `rebar3`
|
||||
- optionally, installing `hex`
|
||||
|
||||
**Note** Currently, this action only supports Actions' `ubuntu-` runtimes.
|
||||
|
||||
## Usage
|
||||
|
||||
See [action.yml](action.yml).
|
||||
See [action.yml](action.yml) for the action's specification.
|
||||
|
||||
**Note** The Erlang/OTP release version specification is [relatively
|
||||
**Note**: The Erlang/OTP release version specification is [relatively
|
||||
complex](http://erlang.org/doc/system_principles/versions.html#version-scheme).
|
||||
For best results, we recommend specifying exact Erlang/OTP, Elixir versions, and
|
||||
`rebar3` versions.
|
||||
However, values like `22.x` are also accepted, and we attempt to resolve them
|
||||
However, values like `22.x`, or even `>22`, are also accepted, and we attempt to resolve them
|
||||
according to semantic versioning rules.
|
||||
|
||||
Additionally, it is recommended that one specifies Erlang/OTP, Elixir and `rebar3` versions
|
||||
@@ -41,13 +42,14 @@ and Erlang/OTP.
|
||||
|
||||
| Ubuntu | Erlang/OTP | Status
|
||||
|- |- |-
|
||||
| ubuntu-16.04 | 17 - 23 | ✅
|
||||
| ubuntu-18.04 | 17 - 23 | ✅
|
||||
| ubuntu-20.04 | 20 - 23 | ✅
|
||||
| ubuntu-16.04 | 17 - 24 | ✅
|
||||
| ubuntu-18.04 | 17 - 24 | ✅
|
||||
| ubuntu-20.04 | 20 - 24 | ✅
|
||||
|
||||
### Basic example (Elixir)
|
||||
|
||||
```yaml
|
||||
# create this in .github/workflows/ci.yml
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
@@ -66,6 +68,7 @@ jobs:
|
||||
### Basic example (`rebar3`)
|
||||
|
||||
```yaml
|
||||
# create this in .github/workflows/ci.yml
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
@@ -83,6 +86,7 @@ jobs:
|
||||
### Matrix example (Elixir)
|
||||
|
||||
```yaml
|
||||
# create this in .github/workflows/ci.yml
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
@@ -106,6 +110,7 @@ jobs:
|
||||
### Matrix example (`rebar3`)
|
||||
|
||||
```yaml
|
||||
# create this in .github/workflows/ci.yml
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
@@ -125,66 +130,6 @@ jobs:
|
||||
- run: rebar3 ct
|
||||
```
|
||||
|
||||
### Phoenix example
|
||||
|
||||
```yaml
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:11
|
||||
ports: ['5432:5432']
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: '22.2'
|
||||
elixir-version: '1.9.4'
|
||||
- run: mix deps.get
|
||||
- run: mix test
|
||||
```
|
||||
|
||||
#### Authenticating with Postgres in Phoenix
|
||||
|
||||
When using the Phoenix example above, the `postgres` container has some
|
||||
default authentication set up. Specifically, it expects a username of
|
||||
"postgres", and a password of "postgres". It will be available at
|
||||
`localhost:5432`.
|
||||
|
||||
The simplest way of setting these auth values in CI is by checking for the
|
||||
`GITHUB_ACTIONS` environment variable that is set in all workflows:
|
||||
|
||||
```elixir
|
||||
# config/test.exs
|
||||
|
||||
use Mix.Config
|
||||
|
||||
# Configure the database for local testing
|
||||
config :app, App.Repo,
|
||||
database: "my_app_test",
|
||||
hostname: "localhost",
|
||||
pool: Ecto.Adapters.SQL.Sandbox
|
||||
|
||||
# Configure the database for GitHub Actions
|
||||
if System.get_env("GITHUB_ACTIONS") do
|
||||
config :app, App.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres"
|
||||
end
|
||||
```
|
||||
|
||||
## Elixir Problem Matchers
|
||||
|
||||
The Elixir Problem Matchers in this repository are adapted from [here](https://github.com/fr1zle/vscode-elixir/blob/45eddb589acd7ac98e0c7305d1c2b24668ca709a/package.json#L70-L118). See [MATCHER_NOTICE](MATCHER_NOTICE.md) for license details.
|
||||
|
||||
Reference in New Issue
Block a user