Skip to content

Check compatibility #4008

Check compatibility

Check compatibility #4008

name: Check compatibility
on:
pull_request:
branches:
- main
paths-ignore:
- '**/README.md'
push:
branches:
- main
paths-ignore:
- '**/README.md'
schedule:
- cron: '5 * * * *'
workflow_dispatch: {}
jobs:
cloud-api:
name: Cloud API
timeout-minutes: 3
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Check compatibility
run: ./scripts/check-compatibility.sh
env:
OPVIOUS_TOKEN: ${{ secrets.OPVIOUS_TOKEN }}
image-api:
name: Image API
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
- name: Install Node dependencies
run: npm i -g opvious-cli
- name: Create bucket directory
run: |
bucket="$(mktemp -d)"
sudo chown 1000:1000 "$bucket"
echo "OPVIOUS_BUCKET=$bucket" >>"$GITHUB_ENV"
- name: Start API server
run: |
opvious api start -w \
-b "${{ env.OPVIOUS_BUCKET }}" \
-i latest \
-t [email protected]=testing
env:
OPVIOUS_API_IMAGE_EULA: accepted
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
run: python -m pip install -r requirements.txt
- name: Check compatibility
run: ./scripts/check-compatibility.sh
env:
OPVIOUS_ENDPOINT: http://localhost:8080
OPVIOUS_TOKEN: static:testing
- name: Show API logs
if: failure()
run: opvious api logs