Skip to content

Allow queries without authentication if no API key is provided #227

Allow queries without authentication if no API key is provided

Allow queries without authentication if no API key is provided #227

Workflow file for this run

name: Go
on:
push:
branches: ['trunk']
pull_request:
branches: ['trunk']
workflow_dispatch:
jobs:
build:
name: Build and test ${{matrix.os}} go${{matrix.go-version}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ['1.24', '1.25']
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Vet
run: go vet -v ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.1
- name: Build
run: go build -v ./...
- name: Install Spice (https://install.spiceai.org) (Linux)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl https://install.spiceai.org | /bin/bash
echo "$HOME/.spice/bin" >> $GITHUB_PATH
$HOME/.spice/bin/spice install
- name: install Spice (Windows)
if: matrix.os == 'windows-latest'
run: |
curl -L "https://install.spiceai.org/Install.ps1" -o Install.ps1 && PowerShell -ExecutionPolicy Bypass -File ./Install.ps1
- name: add Spice bin to PATH (Windows)
if: matrix.os == 'windows-latest'
run: |
Add-Content $env:GITHUB_PATH (Join-Path $HOME ".spice\bin")
shell: pwsh
- name: Init and start spice app (Unix)
if: matrix.os != 'windows-latest'
run: |
spice init spice_qs
cd spice_qs
spice add spiceai/quickstart
spice run &> spice.log &
# time to initialize added dataset
sleep 30
- name: Init and start spice app (Windows)
if: matrix.os == 'windows-latest'
run: |
spice init spice_qs
cd spice_qs
spice add spiceai/quickstart
Start-Process -FilePath spice run
# time to initialize added dataset
Start-Sleep -Seconds 30
shell: pwsh
- name: Test
env:
SPICE_HTTP_URL: ${{ vars.SPICE_HTTP_URL }}
SPICE_FLIGHT_URL: ${{ vars.SPICE_FLIGHT_URL }}
SPICE_API_KEY: ${{ secrets.SPICE_CLOUD_API_KEY }}
run: go test -v ./...