Skip to content

Commit

Permalink
add html env, component and quickstart checks
Browse files Browse the repository at this point in the history
  • Loading branch information
benjgil committed Sep 12, 2023
1 parent 0795f4a commit 62ae36d
Show file tree
Hide file tree
Showing 12 changed files with 612 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/html-bare-starter-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Html - Bare Starter - Nightly

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: bitsrc/nightly:latest
env:
HOME: /home/bituser

steps:
- name: Initialize a workspace
run: |
bit
bvm
bvm config set RELEASE_TYPE nightly
bvm upgrade
bit new html my-html-workspace --aspect teambit.html/html-env --default-scope org.scope-name --log error
- name: Check initial status
run: |
cd my-html-workspace
# debugging
bit list --log error
bit status --log error
bit templates --log error
- name: Create a new component
run: |
cd my-html-workspace
bit create html ui/my-first --log error
bit install --log error
bit list --log error
bit status --log error
bit start --log error &
checkserver http://localhost:3000
- name: Test & Lint
run: |
cd my-html-workspace
bit lint --log error
bit test --log error
- name: Create a local scope, compile and export
run: |
barescope my-org.my-scope-name my-html-workspace
cd my-html-workspace
bit scope rename org.scope-name my-org.my-scope-name --refactor --log error
bit link --log error
bit compile --log error
bit tag --message "initial tag" --log error
bit export --log error
continue-on-error: false
54 changes: 54 additions & 0 deletions .github/workflows/html-bare-starter-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Html - Bare Starter - Stable

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: bitsrc/stable:latest
env:
HOME: /home/bituser

steps:
- name: Initialize a workspace
run: |
bit
bvm
bvm config set RELEASE_TYPE nightly
bvm upgrade
bit new html my-html-workspace --aspect teambit.html/html-env --default-scope org.scope-name --log error
- name: Check initial status
run: |
cd my-html-workspace
# debugging
bit list --log error
bit status --log error
bit templates --log error
- name: Create a new component
run: |
cd my-html-workspace
bit create html ui/my-first --log error
bit install --log error
bit list --log error
bit status --log error
bit start --log error &
checkserver http://localhost:3000
- name: Test & Lint
run: |
cd my-html-workspace
bit lint --log error
bit test --log error
- name: Create a local scope, compile and export
run: |
barescope my-org.my-scope-name my-html-workspace
cd my-html-workspace
bit scope rename org.scope-name my-org.my-scope-name --refactor --log error
bit link --log error
bit compile --log error
bit tag --message "initial tag" --log error
bit export --log error
continue-on-error: false
57 changes: 57 additions & 0 deletions .github/workflows/html-create-component-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Html - Create Component - Nightly

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
container:
image: bitsrc/nightly:latest
env:
HOME: /home/bituser
steps:
- name: Show BVM config
run: |
bvm config
- name: Create a new workspace
run: |
bit new html my-workspace --env teambit.html/html-env --default-scope my-org.my-scope --log error
- name: Create a React component and set env
run: |
cd my-workspace
bit create html pages/welcome --env my-org.my-scope/envs/my-html-env --log error
- name: Install dependencies
run: |
cd my-workspace
bit install --add-missing-deps --log error
- name: Show components, envs and status
run: |
cd my-workspace
bit status --log error
bit envs --log error
- name: Compile, lint, test components
run: |
cd my-workspace
bit compile --log error
bit lint --log error
bit test --log error
- name: Preview components
run: |
cd my-workspace
bit start --log error &
checkserver http://localhost:3000
- name: Tag components
run: |
cd my-workspace
bit tag --message "initial tag" --log error
- name: Create a local scope
run: |
barescope my-org.my-scope my-workspace
- name: Export components
run: |
cd my-workspace
bit export --log error
continue-on-error: false
57 changes: 57 additions & 0 deletions .github/workflows/html-create-component-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Html - Create Component - Stable

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
container:
image: bitsrc/stable:latest
env:
HOME: /home/bituser
steps:
- name: Show BVM config
run: |
bvm config
- name: Create a new workspace
run: |
bit new html my-workspace --env teambit.html/html-env --default-scope my-org.my-scope --log error
- name: Create a React component and set env
run: |
cd my-workspace
bit create html pages/welcome --env my-org.my-scope/envs/my-html-env --log error
- name: Install dependencies
run: |
cd my-workspace
bit install --add-missing-deps --log error
- name: Show components, envs and status
run: |
cd my-workspace
bit status --log error
bit envs --log error
- name: Compile, lint, test components
run: |
cd my-workspace
bit compile --log error
bit lint --log error
bit test --log error
- name: Preview components
run: |
cd my-workspace
bit start --log error &
checkserver http://localhost:3000
- name: Tag components
run: |
cd my-workspace
bit tag --message "initial tag" --log error
- name: Create a local scope
run: |
barescope my-org.my-scope my-workspace
- name: Export components
run: |
cd my-workspace
bit export --log error
continue-on-error: false
62 changes: 62 additions & 0 deletions .github/workflows/html-create-env-component-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Html - Create Env and Component - Nightly

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
container:
image: bitsrc/nightly:latest
env:
HOME: /home/bituser
steps:
- name: Show BVM config
run: |
bvm config
- name: Initialize a new workspace
run: |
bit init my-workspace --default-scope my-org.my-scope --log error
- name: Create a Html env
run: |
cd my-workspace
bit create html-env envs/my-html-env --aspect teambit.html/html-env --log error
- name: Create a Html component and set env
run: |
cd my-workspace
bit create html pages/welcome --aspect teambit.html/html-env --log error
bit env set my-org.my-scope/pages/welcome my-org.my-scope/envs/my-html-env --log error
- name: Install dependencies
run: |
cd my-workspace
bit install --add-missing-deps --log error
- name: Show components, envs and status
run: |
cd my-workspace
bit status --log error
bit envs --log error
- name: Compile, lint, test components
run: |
cd my-workspace
bit compile --log error
bit lint --log error
bit test --log error
- name: Preview components
run: |
cd my-workspace
bit start --log error &
checkserver http://localhost:3000
- name: Tag components
run: |
cd my-workspace
bit tag --message "initial tag" --log error
- name: Create a local scope
run: |
barescope my-org.my-scope my-workspace
- name: Export components
run: |
cd my-workspace
bit export --log error
continue-on-error: false
62 changes: 62 additions & 0 deletions .github/workflows/html-create-env-component-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Html - Create Env and Component - Stable

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
container:
image: bitsrc/stable:latest
env:
HOME: /home/bituser
steps:
- name: Show BVM config
run: |
bvm config
- name: Initialize a new workspace
run: |
bit init my-workspace --default-scope my-org.my-scope --log error
- name: Create a Html env
run: |
cd my-workspace
bit create html-env envs/my-html-env --aspect teambit.html/html-env --log error
- name: Create a Html component and set env
run: |
cd my-workspace
bit create html pages/welcome --aspect teambit.html/html-env --log error
bit env set my-org.my-scope/pages/welcome my-org.my-scope/envs/my-html-env --log error
- name: Install dependencies
run: |
cd my-workspace
bit install --add-missing-deps --log error
- name: Show components, envs and status
run: |
cd my-workspace
bit status --log error
bit envs --log error
- name: Compile, lint, test components
run: |
cd my-workspace
bit compile --log error
bit lint --log error
bit test --log error
- name: Preview components
run: |
cd my-workspace
bit start --log error &
checkserver http://localhost:3000
- name: Tag components
run: |
cd my-workspace
bit tag --message "initial tag" --log error
- name: Create a local scope
run: |
barescope my-org.my-scope my-workspace
- name: Export components
run: |
cd my-workspace
bit export --log error
continue-on-error: false
Loading

0 comments on commit 62ae36d

Please sign in to comment.