Skip to content

Fix typo

Fix typo #63

name: AdventureRegistrations checks
on: push
jobs:
mix-test:
runs-on: ubuntu-20.04
services:
db:
image: postgres:latest
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
elixir: ["1.14.0"]
otp: ["23.3.2"] # FIXME get from .tool-versions
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Github repo
uses: actions/checkout@v3
- name: Sets up an Erlang/OTP environment
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Retrieve cached dependencies
uses: actions/cache@v3
id: mix-cache
with:
path: |
registrations/deps
registrations/_build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
- name: Install dependencies
working-directory: registrations
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
- uses: actions/setup-node@v3
with:
node-version-file: "registrations/assets/package.json"
cache: "npm"
cache-dependency-path: "registrations/assets/package-lock.json"
- run: npm install -g [email protected]
working-directory: registrations
- run: npm install --prefix assets
working-directory: registrations
- run: npm run deploy --prefix assets
working-directory: registrations
- uses: nanasess/setup-chromedriver@v2
- run: |
export DISPLAY=:99
chromedriver &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- run: mix test
working-directory: registrations
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "test results"
files: registrations/_build/test/lib/adventure_registrations/test-junit-report.xml