Skip to content

Instantly share code, notes, and snippets.

@svdmitrij
Created April 15, 2021 13:41
Show Gist options
  • Save svdmitrij/789dacd4fdadb89c15433d02c13fe435 to your computer and use it in GitHub Desktop.
Save svdmitrij/789dacd4fdadb89c15433d02c13fe435 to your computer and use it in GitHub Desktop.
Github action for elixir
name: Elixir CI
on: push
jobs:
test:
runs-on: ubuntu-18.04
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: awesome_list_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
otp-version: 23.0.2
elixir-version: 1.10.3
- uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- uses: actions/setup-node@v1
with:
node-version: "10.x"
- uses: nanasess/setup-chromedriver@master
#with:
#chromedriver-version: "79.0.3945.36"
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- run: mix local.rebar --force
- run: mix local.hex --force
- run: mix deps.get
- run: npm install --prefix assets
- run: npm run deploy --prefix assets
- run: mix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment