GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - actions/setup-elixir: Set up your GitHub Actions workflow with OTP and Elixir

This repository was archived by the owner on Jan 20, 2021. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

100 Commits
100 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.licenses/npm
.licenses/npm
 
 
__tests__
__tests__
 
 
dist
dist
 
 
src
src
 
 
test-project
test-project
 
 
.gitattributes
.gitattributes
 
 
.licensed.yml
.licensed.yml
 
 
.prettierrc
.prettierrc
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.md
LICENSE.md
 
 
MATCHER_NOTICE.md
MATCHER_NOTICE.md
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

setup-elixir

Please note: This repository is currently unmaintained by a team of developers at GitHub. It is now maintained by the Erlang Ecosystem Foundation at erlef/setup-elixir. Rather than using actions/setup-elixir, please begin referring to that action in your workflows, instead.

This action sets up an Elixir environment for use in a GitHub Actions workflow by:

  • Installing OTP
  • Installing Elixir

Note Currently, this action currently only supports Actions' ubuntu- runtimes.

Usage

See action.yml.

Note The OTP release version specification is relatively complex. For best results, we recommend specifying exact OTP and Elixir versions. However, values like 22.x are also accepted, and we attempt to resolve them according to semantic versioning rules.

Additionally, it is recommended that one specifies OTP and Elixir versions using YAML strings, as these examples do, so that numbers like 23.0 don't end up being parsed as 23, which is not equivalent.

For pre-release Elixir versions, such as 1.11.0-rc.0, use the full version specifier (1.11.0-rc.0). Pre-release versions are opt-in, so 1.11.x will not match a pre-release.

Basic example

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-elixir@v1
        with:
          otp-version: '22.2'
          elixir-version: '1.9.4'
      - run: mix deps.get
      - run: mix test

Matrix example

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
    strategy:
      matrix:
        otp: ['20.3', '21.3', '22.2']
        elixir: ['1.8.2', '1.9.4']
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-elixir@v1
        with:
          otp-version: ${{matrix.otp}}
          elixir-version: ${{matrix.elixir}}
      - run: mix deps.get
      - run: mix test

Phoenix example

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: actions/setup-elixir@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:

# 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

Matchers

The problem matchers in this repository are adapted from here. See MATCHER_NOTICE for license details.

License

The scripts and documentation in this project are released under the MIT license.

Contributing

Check out this doc.

Current Status

This action is in active development.

About

Set up your GitHub Actions workflow with OTP and Elixir

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

157 stars

Watchers

1 watching

Forks

40 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.