Skip to content

cancel cralwer with navigate away from preview tab #410

cancel cralwer with navigate away from preview tab

cancel cralwer with navigate away from preview tab #410

Workflow file for this run

on:
push:
branches:
- main
paths:
- core/**
pull_request:
branches:
- main
paths:
- core/**
env:
MIX_ENV: test
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
services:
db:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: canary_test
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
typesense:
image: typesense/typesense:26.0
steps:
- uses: actions/checkout@v3
with:
sparse-checkout: core
- uses: erlef/setup-beam@v1
with:
version-file: core/.tool-versions
version-type: strict
- uses: actions/cache@v3
id: cache-deps
env:
cache-name: cache-elixir-deps
with:
path: core/deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
- uses: actions/cache@v3
id: cache-build
env:
cache-name: cache-compiled-build
with:
path: core/_build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
- if: github.run_attempt != '1'
run: |
mix deps.clean --all
mix clean
shell: sh
- run: mix deps.get
working-directory: core
- run: mix compile --warnings-as-errors
working-directory: core
- run: mix format --check-formatted
working-directory: core
- run: |
docker run -d \
-p 8108:8108 \
--name typesense \
-v /tmp/typesense:/data \
typesense/typesense:27.0 \
--api-key=canary \
--data-dir /data \
--enable-cors
- run: mix test
working-directory: core