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

chore(internal): try new generated ci #514

Merged
merged 11 commits into from
May 30, 2022
149 changes: 79 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: CI
on:
"on":
pull_request: null
push:
branches:
- main
- master
schedule:
- cron: 0 3 * * 0
- cron: "0 3 * * 0 "
env:
CI: true
dist: ember-resources/dist
Expand All @@ -23,8 +22,7 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
Expand All @@ -50,16 +48,14 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
- name: Install Dependencies
run: pnpm install
- name: ESLint
run: pnpm run lint:js
working-directory: ${{ matrix.path }}
run: cd ${{ matrix.path }} && pnpm run lint:js
commits:
name: Commit Messages
timeout-minutes: 5
Expand All @@ -70,7 +66,7 @@ jobs:
fetch-depth: 0
- uses: volta-cli/action@v1
- uses: wagoid/[email protected]
build_test:
build:
name: Build Tests
needs:
- install_dependencies
Expand All @@ -84,26 +80,38 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
- name: Install Dependencies
run: pnpm install
- name: Build and Assert Output
run: pnpm --filter ember-resources-build-test test
run: |-
echo 'target: ember-resources/dist
setup:
run: pnpm run build:js
cwd: ./ember-resources
expect: |
core
util
deprecated-in-v4
index.js
index.js.map
index.d.ts
index.d.ts.map
' >> assert-contents.config.yml
npx assert-folder-contents
- uses: actions/upload-artifact@v3
with:
name: dist
path: ${{ env.dist }}
asset-sizes:
name: Measure Asset Sizes
tests:
name: Default Tests
timeout-minutes: 5
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
needs:
- build_test
- build
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
Expand All @@ -112,8 +120,7 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
Expand All @@ -124,18 +131,13 @@ jobs:
with:
name: dist
path: ${{ env.dist }}
- name: measure asset sizes
run: node ./build/estimate-bytes/index.js
- name: comment on PR
uses: marocchino/sticky-pull-request-comment@v2
with:
path: ./build/estimate-bytes/comment.txt
tests:
name: Default Tests
- run: pnpm --filter ember-app run test:ember
floating-deps-tests:
name: Floating Deps Test
timeout-minutes: 5
runs-on: ubuntu-latest
needs:
- build_test
- build
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
Expand All @@ -144,44 +146,24 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
- name: Install Dependencies
run: pnpm install
- name: Download built package from cache
uses: actions/download-artifact@v3
with:
name: dist
path: ${{ env.dist }}
- run: pnpm --filter ember-app run ember:test
floating-deps-tests:
name: Floating Deps Test
timeout-minutes: 5
runs-on: ubuntu-latest
needs:
- build_test
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- uses: pnpm/[email protected]
with:
version: 7.1.2
- name: Install Dependencies
- name: Install Dependencies (without lockfile)
run: rm pnpm-lock.yaml && pnpm install
- name: Download built package from cache
uses: actions/download-artifact@v3
with:
name: dist
path: ${{ env.dist }}
- run: pnpm --filter ember-app run ember:test
- run: pnpm --filter ember-app run test:ember
try-scenarios:
name: ${{ matrix.ember-try-scenario }}
timeout-minutes: 10
runs-on: ubuntu-latest
needs: tests
needs:
- tests
strategy:
fail-fast: true
matrix:
Expand All @@ -205,8 +187,7 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
Expand All @@ -218,16 +199,17 @@ jobs:
name: dist
path: ${{ env.dist }}
- name: test
working-directory: testing/ember-app
run: >
working-directory: ./testing/ember-app
run: >-
node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }}
--skip-cleanup
typescript-compatibility:
name: ${{ matrix.typescript-scenario }}
timeout-minutes: 5
runs-on: ubuntu-latest
continue-on-error: true
needs: build_test
needs:
- build
strategy:
fail-fast: true
matrix:
Expand All @@ -240,20 +222,17 @@ jobs:
- [email protected]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: volta-cli/action@v1
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
- name: Install Dependencies
- name: Install Dependencies (without lockfile)
run: rm pnpm-lock.yaml && pnpm install
- name: Download built package from cache
uses: actions/download-artifact@v3
Expand All @@ -262,16 +241,16 @@ jobs:
path: ${{ env.dist }}
- name: Update TS Version
run: pnpm add --save-dev ${{ matrix.typescript-scenario }}
working-directory: testing/ember-app
working-directory: ./testing/ember-app
- name: Type checking
run: |
pnpm --filter ember-app exec tsc -v
run: |-
pnpm --filter ember-app exec tsc -v;
pnpm --filter ember-app exec tsc --build
publish:
release:
name: Release
timeout-minutes: 5
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
needs:
- tests
- typescript-compatibility
Expand All @@ -287,8 +266,7 @@ jobs:
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
Expand All @@ -305,3 +283,34 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MeasureAssetSizes:
name: Measure Asset Sizes
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 7.1.2
- name: Install Dependencies
run: pnpm install
- name: Download built package from cache
uses: actions/download-artifact@v3
with:
name: dist
path: ${{ env.dist }}
- name: measure asset sizes
run: node ./build/estimate-bytes/index.js
- name: comment on PR
uses: marocchino/sticky-pull-request-comment@v2
with:
path: ./build/estimate-bytes/comment.txt
timeout-minutes: 5
runs-on: ubuntu-latest
27 changes: 0 additions & 27 deletions build/github-workflows/index.js

This file was deleted.

15 changes: 0 additions & 15 deletions build/github-workflows/package.json

This file was deleted.

Loading