Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Renumics/spotlight into main
Browse files Browse the repository at this point in the history
  • Loading branch information
druzsan committed Nov 14, 2023
2 parents 02c45d8 + ef9e06d commit 5dc96af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CI

# We only need `push` triggering event internal, otherwise the workflow will run
# twice. But for forks, we need to run workflow on both `push` and `pull_request`.
# So in case of `pull_request` we check that HEAD is not 'Renumics/spotlight'.

on:
- push
- pull_request
Expand All @@ -8,12 +12,12 @@ on:
# and not in the local actions. Otherwise, no action file found.
# Checkout with `fetch-depth: 0` is needed by `poetry-dynamic-versioning` to get
# the right package version.
# `MATRIX` environment variable is set by the local `generate-matrix` action.

jobs:
# Prepare stage
prepare-python:
name: '🐍 Prepare Python'
if: github.event.pull_request.head.repo.full_name != 'Renumics/spotlight'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -28,6 +32,7 @@ jobs:
pip-cache-dir: ${{ steps.setup-poetry.outputs.pip-cache-dir }}
prepare-node:
name: '⬢ Prepare Node.js'
if: github.event.pull_request.head.repo.full_name != 'Renumics/spotlight'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -39,6 +44,7 @@ jobs:
# Check stage
check-pr:
name: '🔍 Check if pull request'
if: github.event.pull_request.head.repo.full_name != 'Renumics/spotlight'
permissions:
pull-requests: read
runs-on: ubuntu-latest
Expand Down Expand Up @@ -90,6 +96,8 @@ jobs:
needs:
- check-pr
runs-on: ubuntu-latest
# `MATRIX` environment variable is set by the local `generate-matrix`
# action, so use it as check.
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -434,7 +442,7 @@ jobs:
# Release stage
release:
name: '🚀 Release Spotlight'
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'Renumics'
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'Renumics/spotlight'
needs:
- prepare-python
- prepare-node
Expand Down
5 changes: 1 addition & 4 deletions scripts/generate_api_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""
generate the api spec
"""
import os
import json

import click
Expand All @@ -21,11 +20,9 @@
def generate_api_spec(output_path: str) -> None:
"""
generate swagger api spec as json
:param server_name: server name where api is reachable
:param output_path: path to output json
:return:
"""
os.environ["SPOTLIGHT_DEV"] = "True"
app = SpotlightApp()
app.openapi_version = "3.0.2"

Expand All @@ -34,4 +31,4 @@ def generate_api_spec(output_path: str) -> None:


if __name__ == "__main__":
generate_api_spec() # type: ignore
generate_api_spec()

0 comments on commit 5dc96af

Please sign in to comment.