Skip to content

Commit

Permalink
reorder CI test jobs to hopefully start longer ones first
Browse files Browse the repository at this point in the history
  • Loading branch information
busma13 committed Jan 30, 2025
1 parent 8077635 commit 2b8c18e
Showing 1 changed file with 111 additions and 111 deletions.
222 changes: 111 additions & 111 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ jobs:
- name: Test
run: yarn test --suite unit --

teraslice-elasticsearch-tests:
e2e-k8s-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_K8S) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -115,19 +114,27 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Test ${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/teraslice
- name: Compile e2e code
run: yarn build
working-directory: ./e2e

elasticsearch-store-tests:
- name: Install Kind and Kubectl
uses: helm/kind-action@v1.10.0
with:
install_only: "true"

- name: Test k8s elasticsearch7
run: NODE_VERSION=${{ matrix.node-version }} yarn test:k8s
working-directory: ./e2e

e2e-k8s-v2-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_K8S) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -160,43 +167,46 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Test ${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/elasticsearch-store

lint-and-sync:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
# will remove the checkout, build and setup when the artifact is made to just
# test the linting and syncing of the codebase
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Compile e2e code
run: yarn build
working-directory: ./e2e

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSION_MAIN) }}
cache: 'yarn'
- name: Install Kind and Kubectl
uses: helm/kind-action@v1.10.0
with:
install_only: "true"

- name: Install and build packages
run: yarn && yarn setup
- name: Install Helmfile
run: |
VERSION=$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name')
VERSION_NO_V=${VERSION#v}
curl -L "https://github.com/helmfile/helmfile/releases/download/${VERSION}/helmfile_${VERSION_NO_V}_linux_amd64.tar.gz" -o helmfile.tgz
tar -xzf helmfile.tgz
chmod +x helmfile
mv helmfile /usr/local/bin/helmfile
helm plugin install https://github.com/databus23/helm-diff
helmfile version
helm version
- name: Lint codebase
run: yarn lint
- name: Test CLI Commands
run: |
command -v kind
command -v kubectl
command -v helm
command -v helmfile
- name: Sync codebase
run: yarn sync --verify
- name: Test k8s V2 elasticsearch7
run: NODE_VERSION=${{ matrix.node-version }} yarn test:k8sV2Helmfile
working-directory: ./e2e

elasticsearch-api-tests:
e2e-external-storage-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_STORAGE) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -229,19 +239,22 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Test ${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/elasticsearch-api
- name: Compile e2e code
run: yarn build
working-directory: ./e2e

e2e-tests:
- name: Test external Asset Storage opensearch1
run: NODE_VERSION=${{ matrix.node-version }} yarn test:s3AssetStorage
working-directory: ./e2e

e2e-external-storage-tests-encrypted:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_STORAGE) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -274,22 +287,35 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Install mkcert
run: curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" && sudo chmod 777 mkcert-v*-linux-amd64 && sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert

- name: Install grep
run: sudo apt update && sudo apt install grep

- name: Check mkcert
run: command -v mkcert

- name: Check grep
run: command -v grep

- name: Compile e2e code
run: yarn build
working-directory: ./e2e

- name: Test ${{ matrix.search-version }}
run: NODE_VERSION=${{ matrix.node-version }} yarn test:${{ matrix.search-version }}
- name: Test external Asset Storage opensearch1
run: ENCRYPT_MINIO=true NODE_VERSION=${{ matrix.node-version }} yarn test:s3AssetStorage
working-directory: ./e2e

e2e-k8s-tests:
teraslice-elasticsearch-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_K8S) }}
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -322,27 +348,19 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Compile e2e code
run: yarn build
working-directory: ./e2e

- name: Install Kind and Kubectl
uses: helm/kind-action@v1.10.0
with:
install_only: "true"

- name: Test k8s elasticsearch7
run: NODE_VERSION=${{ matrix.node-version }} yarn test:k8s
working-directory: ./e2e
- name: Test ${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/teraslice

e2e-k8s-v2-tests:
elasticsearch-store-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_K8S) }}
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -375,46 +393,43 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Compile e2e code
run: yarn build
working-directory: ./e2e
- name: Test ${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/elasticsearch-store

- name: Install Kind and Kubectl
uses: helm/kind-action@v1.10.0
with:
install_only: "true"
lint-and-sync:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
# will remove the checkout, build and setup when the artifact is made to just
# test the linting and syncing of the codebase
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Install Helmfile
run: |
VERSION=$(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest | jq -r '.tag_name')
VERSION_NO_V=${VERSION#v}
curl -L "https://github.com/helmfile/helmfile/releases/download/${VERSION}/helmfile_${VERSION_NO_V}_linux_amd64.tar.gz" -o helmfile.tgz
tar -xzf helmfile.tgz
chmod +x helmfile
mv helmfile /usr/local/bin/helmfile
helm plugin install https://github.com/databus23/helm-diff
helmfile version
helm version
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSION_MAIN) }}
cache: 'yarn'

- name: Test CLI Commands
run: |
command -v kind
command -v kubectl
command -v helm
command -v helmfile
- name: Install and build packages
run: yarn && yarn setup

- name: Test k8s V2 elasticsearch7
run: NODE_VERSION=${{ matrix.node-version }} yarn test:k8sV2Helmfile
working-directory: ./e2e
- name: Lint codebase
run: yarn lint

e2e-external-storage-tests:
- name: Sync codebase
run: yarn sync --verify

elasticsearch-api-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_STORAGE) }}
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -447,22 +462,19 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Compile e2e code
run: yarn build
working-directory: ./e2e

- name: Test external Asset Storage opensearch1
run: NODE_VERSION=${{ matrix.node-version }} yarn test:s3AssetStorage
working-directory: ./e2e
- name: Test ${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/elasticsearch-api

e2e-external-storage-tests-encrypted:
e2e-tests:
runs-on: ubuntu-latest
needs: [compute-node-version-vars, verify-build, cache-docker-images]
strategy:
# opensearch is finiky, keep testing others if it fails
fail-fast: false
matrix:
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS_EXT_STORAGE) }}
node-version: ${{ fromJSON(needs.compute-node-version-vars.outputs.NODE_VERSIONS) }}
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -495,24 +507,12 @@ jobs:
path: /tmp/docker_cache
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Install mkcert
run: curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" && sudo chmod 777 mkcert-v*-linux-amd64 && sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert

- name: Install grep
run: sudo apt update && sudo apt install grep

- name: Check mkcert
run: command -v mkcert

- name: Check grep
run: command -v grep

- name: Compile e2e code
run: yarn build
working-directory: ./e2e

- name: Test external Asset Storage opensearch1
run: ENCRYPT_MINIO=true NODE_VERSION=${{ matrix.node-version }} yarn test:s3AssetStorage
- name: Test ${{ matrix.search-version }}
run: NODE_VERSION=${{ matrix.node-version }} yarn test:${{ matrix.search-version }}
working-directory: ./e2e

check-docker-limit-after:
Expand Down

0 comments on commit 2b8c18e

Please sign in to comment.