Add user auth tokens & create APIs for project sources (#263) #931
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "👾 Azimutt CI" | |
on: | |
push: | |
branches-ignore: | |
- refs/tags/* | |
pull_request: | |
types: [ open ] | |
jobs: | |
cancel: | |
name: "❌ Cancel Previous Runs" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
test: | |
name: "🛠 Build and test" | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
matrix: | |
elixir: [ '1.14' ] | |
otp: [ '25' ] | |
services: | |
db: | |
image: postgres:14 | |
ports: [ '5432:5432' ] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup elixir | |
uses: erlef/setup-elixir@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Get deps cache | |
uses: actions/cache@v3 | |
with: | |
path: deps/ | |
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
- name: Get build cache | |
uses: actions/cache@v3 | |
with: | |
path: _build/test/ | |
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
- name: Install Dependencies | |
run: | | |
npm install | |
npm run libs:setup | |
npm run fe:build | |
- name: Check format | |
run: | | |
npm run ex:install | |
npm run format | |
- name: Check lint | |
run: | | |
npm run lint | |
- name: Check build | |
run: | | |
npm run build | |
- name: Run tests | |
env: | |
PHX_HOST: localhost | |
PORT: 4000 | |
FILE_STORAGE_ADAPTER: local | |
run: | | |
npm run test |