forked from tsai/budibase
18 changed files with 145 additions and 36 deletions
@ -0,0 +1,46 @@ |
|||
name: Budibase Smoke Test |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
|
|||
jobs: |
|||
release: |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v2 |
|||
- name: Use Node.js 14.x |
|||
uses: actions/setup-node@v1 |
|||
with: |
|||
node-version: 14.x |
|||
- run: yarn |
|||
- run: yarn bootstrap |
|||
- run: yarn build |
|||
- name: Pull cypress.env.yaml from budibase-infra |
|||
run: | |
|||
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \ |
|||
-H 'Accept: application/vnd.github.v3.raw' \ |
|||
-o packages/builder/cypress.env.json \ |
|||
-L https://api.github.com/repos/budibase/budibase-infra/contents/test/cypress.env.json |
|||
wc -l packages/builder/cypress.env.json |
|||
- run: yarn test:e2e:ci |
|||
env: |
|||
CI: true |
|||
name: Budibase CI |
|||
|
|||
# TODO: upload recordings to s3 |
|||
# - name: Configure AWS Credentials |
|||
# uses: aws-actions/configure-aws-credentials@v1 |
|||
# with: |
|||
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
|||
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
|||
# aws-region: eu-west-1 |
|||
|
|||
# TODO look at cypress reporters |
|||
# - name: Discord Webhook Action |
|||
# uses: tsickert/discord-webhook@v4.0.0 |
|||
# with: |
|||
# webhook-url: ${{ secrets.PROD_DEPLOY_WEBHOOK_URL }} |
|||
# content: "Production Deployment Complete: ${{ env.RELEASE_VERSION }} deployed to Budibase Cloud." |
|||
# embed-title: ${{ env.RELEASE_VERSION }} |
|||
|
|||
@ -1,16 +1,26 @@ |
|||
export const Cookies = { |
|||
Auth: "budibase:auth", |
|||
CurrentApp: "budibase:currentapp", |
|||
ReturnUrl: "budibase:returnurl", |
|||
} |
|||
|
|||
export function setCookie(name, value) { |
|||
if (getCookie(name)) { |
|||
removeCookie(name) |
|||
} |
|||
window.document.cookie = `${name}=${value}; Path=/;` |
|||
} |
|||
|
|||
export function getCookie(cookieName) { |
|||
return document.cookie.split(";").some(cookie => { |
|||
return cookie.trim().startsWith(`${cookieName}=`) |
|||
}) |
|||
const value = `; ${document.cookie}` |
|||
const parts = value.split(`; ${cookieName}=`) |
|||
if (parts.length === 2) { |
|||
return parts[1].split(";").shift() |
|||
} |
|||
} |
|||
|
|||
export function removeCookie(cookieName) { |
|||
if (getCookie(cookieName)) { |
|||
document.cookie = `${cookieName}=; Max-Age=-99999999;` |
|||
document.cookie = `${cookieName}=; Max-Age=-99999999; Path=/;` |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue