Add Erlang 24 to README and some more info on version matching (#45)

This commit is contained in:
Paulo F. Oliveira
2021-06-09 15:59:44 +01:00
committed by GitHub
parent 31cf3db78c
commit e6db7bde79
2 changed files with 12 additions and 67 deletions
+1 -1
View File
@@ -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 MIT License
+11 -66
View File
@@ -12,18 +12,19 @@ workflow by:
- installing Erlang/OTP - installing Erlang/OTP
- optionally, installing Elixir - optionally, installing Elixir
- optionally, installing `rebar3` - optionally, installing `rebar3`
- optionally, installing `hex`
**Note** Currently, this action only supports Actions' `ubuntu-` runtimes. **Note** Currently, this action only supports Actions' `ubuntu-` runtimes.
## Usage ## 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). complex](http://erlang.org/doc/system_principles/versions.html#version-scheme).
For best results, we recommend specifying exact Erlang/OTP, Elixir versions, and For best results, we recommend specifying exact Erlang/OTP, Elixir versions, and
`rebar3` versions. `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. according to semantic versioning rules.
Additionally, it is recommended that one specifies Erlang/OTP, Elixir and `rebar3` versions 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 | Erlang/OTP | Status
|- |- |- |- |- |-
| ubuntu-16.04 | 17 - 23 | ✅ | ubuntu-16.04 | 17 - 24 | ✅
| ubuntu-18.04 | 17 - 23 | ✅ | ubuntu-18.04 | 17 - 24 | ✅
| ubuntu-20.04 | 20 - 23 | ✅ | ubuntu-20.04 | 20 - 24 | ✅
### Basic example (Elixir) ### Basic example (Elixir)
```yaml ```yaml
# create this in .github/workflows/ci.yml
on: push on: push
jobs: jobs:
@@ -66,6 +68,7 @@ jobs:
### Basic example (`rebar3`) ### Basic example (`rebar3`)
```yaml ```yaml
# create this in .github/workflows/ci.yml
on: push on: push
jobs: jobs:
@@ -83,6 +86,7 @@ jobs:
### Matrix example (Elixir) ### Matrix example (Elixir)
```yaml ```yaml
# create this in .github/workflows/ci.yml
on: push on: push
jobs: jobs:
@@ -106,6 +110,7 @@ jobs:
### Matrix example (`rebar3`) ### Matrix example (`rebar3`)
```yaml ```yaml
# create this in .github/workflows/ci.yml
on: push on: push
jobs: jobs:
@@ -125,66 +130,6 @@ jobs:
- run: rebar3 ct - 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 ## 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. 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.