Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update release.yaml for automated release workflow #14

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,46 @@
name: build
name: Build repository

on:
workflow_dispatch:
inputs:
run_parallel:
description: 'Run jobs in parallel'
required: false
type: boolean
default: true
self_hosted:
description: 'Run on self-hosted runner'
required: false
type: boolean
default: true
playwright:
description: 'Run playwright'
required: false
type: boolean
default: false
playwright_spec_param:
type: string
description: "Run specific test(s). Example: `landing-page.spec.ts`"
description: 'Run specific playwright test(s) (optional). Example: landing-page.spec.ts'
required: false
push:
pull_request:
types: [opened, ready_for_review]
pull_request_review:
types: [submitted]

jobs:
build:
if: ${{ github.event_name != 'pull_request_review' || github.event.review.state == 'approved' }}
uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@main
secrets: inherit
# Boolean inputs are tricky in Github Actions. Their default is not honored in non-workflow-dispatch actions, so setting a default on push is tricky: https://stackoverflow.com/a/73495922
# To get on push true, use !contains(inputs.myInput, 'false')
# To get on push false, use contains(inputs.myInput, 'true')
with:
run_parallel: ${{ !contains(inputs.run_parallel, 'false') }} # true except if box is not checked
runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked
cypress_enable: false
playwright_enable: true
playwright_run_because_flag: ${{ inputs.playwright == true }}
playwright_run_because_flag: ${{ inputs.playwright == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }}
playwright_spec_param: ${{ inputs.playwright_spec_param }}
playwright_runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
name: release
name: Create a new release PR

on:
workflow_dispatch:
inputs:
release_version:
type: string
description: 'The next version to release'
required: true

on: workflow_dispatch

jobs:
release:
uses: datavisyn/github-workflows/.github/workflows/release-source.yml@main
secrets: inherit
secrets: inherit
with:
release_version: ${{ inputs.release_version }}
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,19 @@ documentation:

.PHONY: install ## Install the requirements
install:
pip install -e .
@if [ ! -z "${CI}" ]; then \
uv pip install -e . --system; \
else \
uv pip install -e .; \
fi

.PHONY: develop ## Set up the development environment
develop:
pip install -e .[develop]
@if [ ! -z "${CI}" ]; then \
uv pip install -e ".[develop]" --system; \
else \
uv pip install -e ".[develop]"; \
fi

.PHONY: env_encrypt ## Encrypts the current ./<app>/.env
env_encrypt:
Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
"build": "yarn run clean && yarn run compile && yarn run copy",
"clean": "visyn_scripts clean build dist lib",
"codegen:openapi": "npx @rtk-query/codegen-openapi ./src/codegen.ts",
"compile:watch": "visyn_scripts compile --watch",
"compile": "visyn_scripts compile",
"compile:watch": "visyn_scripts compile --watch -p tsconfig.lenient.json",
"compile": "visyn_scripts compile -p tsconfig.lenient.json",
"compile:strict:watch": "visyn_scripts compile --watch",
"compile:strict": "visyn_scripts compile",
"copy": "visyn_scripts copy",
"delete-dependencies": "visyn_scripts clean node_modules",
"dist": "mkdir lib && cd dist && tar cvzf ../lib/app_template.tar.gz *",
Expand All @@ -49,15 +51,15 @@
"bundle:prod": "visyn_scripts bundle --mode production --env workspace_mode=single"
},
"dependencies": {
"@reduxjs/toolkit": "^1.8.2",
"react-redux": "^8.0.2",
"visyn_core": "^10.0.3",
"visyn_scripts": "v9.0.0"
"@reduxjs/toolkit": "^1.9.7",
"react-redux": "^8.1.3",
"visyn_core": "^13.0.0",
"visyn_scripts": "^11.1.1"
},
"devDependencies": {
"@playwright/test": "^1.44.0",
"@playwright/test": "^1.46.1",
"@rtk-query/codegen-openapi": "^1.2.0",
"playwright": "^1.44.0"
"playwright": "^1.46.1"
},
"resolutions": {
"@types/react": "~18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pandas==2.0.1
sqlmodel==0.0.8
sse-starlette==1.6.1
visyn_core>=10.0.3,<11.0.0
visyn_core>=13.0.0,<14.0.0
2 changes: 1 addition & 1 deletion src/index.initialize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { App } from './App';
createRoot(document.getElementById('root')).render(
<React.StrictMode>
<Provider store={store}>
<VisynAppProvider appName="App Template">
<VisynAppProvider appName="App Template" disableMantine6>
<App />
</VisynAppProvider>
</Provider>
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.lenient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "visyn_scripts/config/tsconfig.lenient.template.json",
"compilerOptions": {
"jsx": "react",
"outDir": "./dist",
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"tsd.d.ts"
]
}
Loading