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

Move test to github actions. #288

Merged
merged 8 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
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
81 changes: 0 additions & 81 deletions .cirrus.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This file contains configurations to run customer_tests using
# github actions. To learn more about github actions and how to
# update this file please refer to https://docs.github.com/en/actions.
name: Tests
godofredoc marked this conversation as resolved.
Show resolved Hide resolved
on:
push:
branches:
- main
pull_request:

# Declare default permissions as read only.
permissions: read-all

jobs:
linux_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the opposite of "fail-fast"? (and what's the default?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default is True. The opposite is continue_on_error which will continue running all the shards even if one of them fails. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast

Copy link
Contributor

Choose a reason for hiding this comment

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

if the default is true, should be omit this line? having a line that sets the value to the default is generally misleading (people will assume it's doing something intentional)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I'll send a fix!

matrix:
include:
- name: shard 1 of 3
shard-index: 0
- name: shard 2 of 3
shard-index: 1
- name: shard 3 of 32
shard-index: 2
godofredoc marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ${{ matrix.name }}
run: scripts/verify_tests_on_master.sh --shards 3 --shard-index ${{ matrix.shard-index }}
skp_generator_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: skp_generator
run: (cd skp_generator && ./build.sh)
windows_tests:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
include:
- name: shard 1 of 5
shard-index: 0
- name: shard 2 of 5
shard-index: 1
- name: shard 3 of 5
shard-index: 2
- name: shardd 4 of 5
shard-index: 3
- name: shard 5 of 5
shard-index: 4
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ${{ matrix.name }}
run: scripts\verify_tests_on_master.bat --shards 5 --shard-index ${{ matrix.shard-index }}
macos_tests:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
include:
- name: shard 1 of 2
shard-index: 0
- name: shard 2 of 2
shard-index: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

i worry that this method of sharding is going to mean we end up missing shards one day and not noticing (like if someone just increases the "shards" number but doesn't add a new "shard-index" line). Is there any way to guarantee that all the shards are present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From a quick look to the docs I didn't find anything that could be used to calculate indexes programmatically before actions read the file and triggers the builds.

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ${{ matrix.name }}
run: scripts/verify_tests_on_master.sh --shards 2 --shard-index ${{ matrix.shard-index }}