Skip to content

Upload 1Shell 4.1.0 source #88

Upload 1Shell 4.1.0 source

Upload 1Shell 4.1.0 source #88

Workflow file for this run

name: CI - 1Shell 4.1
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
env:
APP_SECRET: ci-test-secret-key-for-testing
APP_LOGIN_PASSWORD: ci-test-password
- name: Install frontend dependencies
run: npm --prefix frontend ci
- name: Build frontend
run: npm --prefix frontend run build
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: Test probe agent
working-directory: agent
run: go test ./...
docker:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t 1shell:test .
- name: Verify container starts
run: |
docker run -d --name 1shell-test \
-e APP_SECRET=ci-test-secret \
-e APP_LOGIN_PASSWORD=ci-test-pw \
-p 3301:3301 \
1shell:test
sleep 5
curl -sf http://localhost:3301/api/health | grep -q '"status":"ok"'
docker stop 1shell-test