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 github CI yaml #934

Merged
merged 2 commits into from
Jun 28, 2023
Merged
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
61 changes: 38 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ name: CI
on:
push:
branches:
- main
- master
- 'v*'
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
Expand All @@ -20,41 +25,48 @@ jobs:

- run: yarn install
- run: yarn lint

tests:
name: Tests
test:
name: "Tests"
runs-on: ubuntu-latest
timeout-minutes: 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect these timeouts won't work for the test suite

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this timeout is only for that particular test, and that test seems to be running in less than a minute so 10 mins is not so bad https://github.com/ember-cli/ember-try/actions/runs/4495038220/jobs/7908231867

The issue that we have is that any tests that hang will time out after 6 hours!! 😱 https://github.com/ember-cli/ember-try/actions/runs/4486271160/jobs/7888744453#step:6:1

I don't know who decided 6 hours was a reasonable default for a timeout but this PR now uses the "ember addon default" of 10 mins for normal tests and 20 mins for the longer smoke tests. And that will allow each test to run for 20 mins not a total running time for all scenarios 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last run of this is a great example of what I mean. Because I fixed CI in #933 all the dependabot PRs updated at the same time and drained the available workers for this repo to run CI. The elapsed time of the last run was quite high because it was waiting for workers but only each individual job was bound by its own timeout 👍


steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14

- run: yarn install
- run: yarn node-test-with-coverage

floating-deps:
name: Tests (floating dependencies)
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: yarn node-test-with-coverage

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14

- run: yarn install --no-lockfile
- run: yarn node-test
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Run Tests
run: yarn node-test

all-commands-smoke-tests:
name: Tests (commands smoke test)
runs-on: ubuntu-latest
timeout-minutes: 20

needs:
- lint
- tests
- floating-deps
- test
- floating

strategy:
fail-fast: false
Expand Down Expand Up @@ -143,10 +155,11 @@ jobs:

name: Smoke Tests (Node v${{ matrix.node }} with npm)
runs-on: ubuntu-latest
timeout-minutes: 20

needs:
- lint
- tests
- test

steps:
- uses: actions/checkout@v1
Expand All @@ -169,10 +182,11 @@ jobs:

name: Smoke Tests (Node v${{ matrix.node }} with yarn)
runs-on: ubuntu-latest
timeout-minutes: 20

needs:
- lint
- tests
- test

steps:
- uses: actions/checkout@v1
Expand All @@ -191,10 +205,11 @@ jobs:
windows-smoke-tests:
name: Smoke Tests (Windows)
runs-on: windows-latest
timeout-minutes: 20

needs:
- lint
- tests
- test

steps:
- uses: actions/checkout@v1
Expand Down