Skip to content

Commit

Permalink
actions: replace local install test with setup-scrypted action (#1488)
Browse files Browse the repository at this point in the history
* actions: replace local install test with setup-scrypted action

* update

* extract server version from package.json

* use package-lock.json
  • Loading branch information
bjia56 committed May 28, 2024
1 parent 93da4ee commit 42ed855
Showing 1 changed file with 20 additions and 44 deletions.
64 changes: 20 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,28 @@ on:
workflow_dispatch:

jobs:
test_linux_local:
name: Test Linux local installation
runs-on: ubuntu-latest
test_local:
name: Test local installation on ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, macos-14, macos-13, windows-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run install script
run: |
cat ./install/local/install-scrypted-dependencies-linux.sh | sudo SERVICE_USER=$USER bash
- name: Test server is running
run: |
systemctl status scrypted.service
curl -k --retry 20 --retry-all-errors --retry-max-time 600 https://localhost:10443/
test_mac_local:
name: Test Mac local installation
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run install script
run: |
mkdir -p ~/.scrypted
bash ./install/local/install-scrypted-dependencies-mac.sh
- name: Test server is running
run: |
curl -k --retry 20 --retry-all-errors --retry-max-time 600 https://localhost:10443/
test_windows_local:
name: Test Windows local installation
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run install script
run: |
.\install\local\install-scrypted-dependencies-win.ps1
- name: Test server is running

- name: Parse latest server release
id: parse_server
shell: bash
run: |
curl -k --retry 20 --retry-all-errors --retry-max-time 600 https://localhost:10443/
VERSION=$(cat ./server/package-lock.json | jq -r '.version')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Will test @scrypted/server@$VERSION"
- name: Install scrypted server
uses: scryptedapp/setup-scrypted@v0.0.2
with:
branch: ${{ github.sha }}
version: ${{ steps.parse_server.outputs.version }}

0 comments on commit 42ed855

Please sign in to comment.