2023-02-02 00:38:35 +01:00
|
|
|
name: Integration Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
2024-07-06 18:43:55 +02:00
|
|
|
- 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests
|
2024-11-08 19:20:02 +01:00
|
|
|
# Only build when files in these directories have been changed
|
|
|
|
paths:
|
|
|
|
- client/**
|
|
|
|
- server/**
|
|
|
|
- test/**
|
|
|
|
- index.js
|
|
|
|
- package.json
|
2023-02-02 00:38:35 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build and test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: setup nade
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2024-01-20 23:39:43 +01:00
|
|
|
node-version: 20
|
2023-02-02 00:38:35 +01:00
|
|
|
|
2024-07-06 18:43:55 +02:00
|
|
|
- name: install pkg (using yao-pkg fork for targetting node20)
|
|
|
|
run: npm install -g @yao-pkg/pkg
|
2023-02-02 00:38:35 +01:00
|
|
|
|
|
|
|
- name: get client dependencies
|
|
|
|
working-directory: client
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: build client
|
|
|
|
working-directory: client
|
|
|
|
run: npm run generate
|
|
|
|
|
|
|
|
- name: get server dependencies
|
|
|
|
run: npm ci --only=production
|
|
|
|
|
|
|
|
- name: build binary
|
2024-07-06 18:43:55 +02:00
|
|
|
run: pkg -t node20-linux-x64 -o audiobookshelf .
|
2023-02-02 00:38:35 +01:00
|
|
|
|
|
|
|
- name: run audiobookshelf
|
|
|
|
run: |
|
|
|
|
./audiobookshelf &
|
|
|
|
sleep 5
|
|
|
|
|
|
|
|
- name: test if server is available
|
|
|
|
run: curl -sf http://127.0.0.1:3333 | grep Audiobookshelf
|