Skip to content

Commit

Permalink
SNOW-896752 - Add node20 on Ubuntu to github action tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pmotacki committed Sep 29, 2023
1 parent ad1fc9c commit 09d91a2
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 91 deletions.
181 changes: 90 additions & 91 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Build
shell: bash
env:
WHITESOURCE_API_KEY: ${{ secrets.WHITESOURCE_API_KEY }}
run: ./ci/build.sh
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: artifacts
path: artifacts
Expand All @@ -48,20 +48,21 @@ jobs:
strategy:
fail-fast: false
matrix:
cloud: [ 'AWS', 'AZURE', 'GCP' ]
nodeVersion: [ '14.x', '16.x', '18.x', '20.x']
cloud: [ 'AWS']
nodeVersion: [ '14.x',]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeVersion }}
- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Download Build Artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: artifacts
path: artifacts
- name: Install Homebrew Bash
shell: bash
run: brew install bash
Expand All @@ -78,89 +79,87 @@ jobs:
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
fail_ci_if_error: true

test-windows:
needs: build
name: Tests on Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
cloud: [ 'AWS', 'AZURE', 'GCP' ]
nodeVersion: [ '14.x', '16.x', '18.x', '20.x']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeVersion }}
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Download Build Artifacts
uses: actions/download-artifact@v1
with:
name: artifacts
- name: Tests
shell: cmd
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
CLOUD_PROVIDER: ${{ matrix.cloud }}
run: ci\\test_windows.bat

test-linux:
needs: build
name: Tests on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [ 'nodejs-centos7-node14', 'nodejs-centos7-fips']
cloud: [ 'AWS', 'AZURE', 'GCP' ]
steps:
- uses: actions/checkout@v1
- name: Download Build Artifacts
uses: actions/download-artifact@v1
with:
name: artifacts
- name: Tests
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
CLOUD_PROVIDER: ${{ matrix.cloud }}
TARGET_DOCKER_TEST_IMAGE: ${{ matrix.image }}
run: ./ci/test.sh
test-ubuntu:
needs: build
name: Tests on Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cloud: [ 'AWS', 'AZURE', 'GCP' ]
nodeVersion: ['18.x', '20.x']
steps:
- uses: actions/checkout@v1
- name: Download Build Artifacts
uses: actions/download-artifact@v1
with:
name: artifacts
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Tests
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
CLOUD_PROVIDER: ${{ matrix.cloud }}
run: ./ci/test_ubuntu.sh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
# without the token code cov may fail because of Github limits https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
fail_ci_if_error: true
# test-windows:
# needs: build
# name: Tests on Windows
# runs-on: windows-latest
# strategy:
# fail-fast: false
# matrix:
# cloud: [ 'AWS', 'AZURE', 'GCP' ]
# nodeVersion: [ '14.x', '16.x', '18.x', '20.x']
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.nodeVersion }}
# - uses: actions/setup-python@v4
# with:
# python-version: '3.7'
# architecture: 'x64'
# - name: Download Build Artifacts
# uses: actions/download-artifact@v3
# with:
# name: artifacts
# - name: Tests
# shell: cmd
# env:
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
# CLOUD_PROVIDER: ${{ matrix.cloud }}
# run: ci\\test_windows.bat
#
# test-linux:
# needs: build
# name: Tests on Linux
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# image: [ 'nodejs-centos7-node14', 'nodejs-centos7-fips']
# cloud: [ 'AWS', 'AZURE', 'GCP' ]
# steps:
# - uses: actions/checkout@v4
# - name: Download Build Artifacts
# uses: actions/download-artifact@v3
# with:
# name: artifacts
# - name: Tests
# shell: bash
# env:
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
# CLOUD_PROVIDER: ${{ matrix.cloud }}
# TARGET_DOCKER_TEST_IMAGE: ${{ matrix.image }}
# run: ./ci/test.sh
# test-ubuntu:
# needs: build
# name: Tests on Ubuntu
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# cloud: [ 'AWS', 'AZURE', 'GCP' ]
# nodeVersion: ['18.x', '20.x']
# steps:
# - uses: actions/checkout@v4
# - name: Download Build Artifacts
# uses: actions/download-artifact@v3
# with:
# name: artifacts
# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# - name: Tests
# shell: bash
# env:
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
# CLOUD_PROVIDER: ${{ matrix.cloud }}
# run: ./ci/test_ubuntu.sh
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# with:
# # without the token code cov may fail because of Github limits https://github.com/codecov/codecov-action/issues/557
# token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
# fail_ci_if_error: true


3 changes: 3 additions & 0 deletions ci/test_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# Test NodeJS for Mac
#

echo "DOWNLOADED"
echo $(ls /Users/runner/work/snowflake-connector-nodejs/snowflake-connector-nodejs/)
set -o pipefail
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $THIS_DIR/scripts/set_git_info.sh
Expand Down
3 changes: 3 additions & 0 deletions ci/test_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# Test NodeJS for Ubuntu
#

echo "DOWNLOADED"
echo $(ls /Users/runner/work/snowflake-connector-nodejs/snowflake-connector-nodejs/)
set -o pipefail
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $THIS_DIR/scripts/set_git_info.sh
Expand Down

0 comments on commit 09d91a2

Please sign in to comment.