godber is testing the Teraslice Asset #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Teraslice Asset | |
run-name: ${{ github.actor }} is testing the Teraslice Asset | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test-es6-legacy-linux: | |
runs-on: ubuntu-latest | |
env: | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
strategy: | |
matrix: | |
# NOTE: Hard Coded Node Version array, should match array in build-and-publish-asset.yml | |
node-version: [14.21.3, 16.19.1, 18.16.0] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
# we login to docker to avoid docker pull limit rates | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- run: yarn setup | |
- run: yarn lint | |
- run: yarn --silent test:legacy | |
test-elasticsearch-assets: | |
runs-on: ubuntu-latest | |
env: | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
strategy: | |
# opensearch is finiky, keep testing others if it fails | |
fail-fast: false | |
matrix: | |
# NOTE: Hard Coded Node Version array, should match array in build-and-publish-asset.yml | |
node-version: [14.21.3, 16.19.1, 18.16.0] | |
search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
# we login to docker to avoid docker pull limit rates | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- run: yarn setup | |
- run: yarn lint | |
- name: Test asset for ${{ matrix.search-version }} | |
run: yarn --silent test:${{ matrix.search-version }} | |
- name: Test apis for ${{ matrix.search-version }} | |
run: yarn --silent test:${{ matrix.search-version }} | |
working-directory: ./packages/elasticsearch-asset-apis | |
# TODO: | |
# - Add Macos Test | |
# - Add post test build verify for all supported node versions, no Opensearch/ES | |
# test-macos: | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Use Node.js | |
# uses: actions/setup-node@v3 | |
# with: | |
# # NOTE: Hard Coded Node Version | |
# node-version: '18.16.0' | |
# - run: yarn setup | |
# - run: yarn lint | |
# # TODO: Ideally we'd be able to at least run unit tests that don't require docker. | |
# #- run: yarn test:all | |
# - run: yarn global add teraslice-cli | |
# - run: teraslice-cli -v | |
# - run: teraslice-cli assets build | |
# - run: ls -l build/ |