Skip to content

Start using Kolay #1477

Start using Kolay

Start using Kolay #1477

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request: {}
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: this-is-not-a-secret
TURBO_TEAM: myself
jobs:
setup:
name: 'Setup'
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
pending: ${{ steps.set-pending.outputs.pending }}
steps:
- uses: wyvox/action@v1
with:
node-version: 18.18.1
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- id: set-pending
run: echo "pending=$(./cache-status.sh)" >> $GITHUB_OUTPUT
- run: echo ${{ github.event.number }} > ./pr-number.txt
# Every PR will need linting. Turbo's cache can optimize per-package
lint:
name: Lint
runs-on: ubuntu-latest
needs: [setup]
timeout-minutes: 5
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: ls -la ember-primitives/
- run: pnpm lint
test:
name: "Default Tests"
runs-on: ubuntu-latest
needs: [setup]
timeout-minutes: 5
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 18.18.1
- run: pnpm build
- run: pnpm turbo test --filter test-app
floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 5
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pnpm-args: --no-lockfile
node-version: 18.18.1
- run: pnpm build
- run: pnpm turbo test --filter test-app
try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 10
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-4.12
- ember-5.1
- ember-release
- ember-beta
- ember-canary
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 18.18.1
- run: pnpm build
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app
# NOTE: Docs' types don't need checking because we check types in the
# Lint phase up above
# This job is for checking specific versions of typescript
typecheck:
name: '${{ matrix.typescript-scenario }}'
runs-on: ubuntu-latest
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app['lint:types'].status == 'MISS' }}
timeout-minutes: 5
needs: [test]
continue-on-error: true
strategy:
fail-fast: true
matrix:
typescript-scenario:
- typescript@5.2
- typescript@5.3
- typescript@rc
- typescript@next
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 18.18.1
- run: pnpm build
- name: 'Change TS to ${{ matrix.typescript-scenario }}'
run: 'pnpm add --save-dev ${{ matrix.typescript-scenario}}'
working-directory: ./test-app
- name: 'Type checking'
run: pnpm turbo --filter 'test-app' lint:types
docs-tests:
name: "Docs' Tests"
# if: ${{ fromJSON(needs.setup.outputs.pending).docs-app.test.status == 'MISS' }}
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [setup]
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 18.18.1
- run: |
pnpm build
pnpm build --filter docs-api
pnpm test --filter docs-app
DeployProduction:
name: "Deploy: Production"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [setup]
strategy:
matrix:
app:
- { path: "./docs-app/dist", cloudflareName: "ember-primitives", name: "docs" }
permissions:
contents: read
deployments: write
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 18.18.1
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: pnpm build --filter docs-api
- run: pnpm i -f # sync for some reason isn't running before lint
- run: pnpm ember build
working-directory: docs-app
- name: Publish ${{ matrix.app.id }}
uses: cloudflare/pages-action@v1.5.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ matrix.app.cloudflareName }}
directory: ${{ matrix.app.path }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}