chore(CE): add payload limit to databricks model (#554) #439
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: server-ci | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "server/**" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "server/**" | ||
env: | ||
DB_HOST: localhost | ||
DB_USERNAME: postgres | ||
DB_PASSWORD: postgres | ||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
services: | ||
postgres: | ||
image: postgres:13 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: multiwoven_test | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.0 | ||
- name: Update package list | ||
run: sudo apt update | ||
- name: Download and Extract DuckDB ODBC driver | ||
run: | | ||
wget -O duckdb.zip https://github.com/duckdb/duckdb/releases/download/v1.0.0/libduckdb-linux-amd64.zip | ||
unzip duckdb.zip -d libduckdb | ||
sudo mv libduckdb/duckdb.* /usr/local/include | ||
sudo mv libduckdb/libduckdb.so /usr/local/lib | ||
sudo ldconfig /usr/local/lib | ||
- name: Download and Install Oracle Instant Client | ||
run: | | ||
wget http://ftp.debian.org/debian/pool/main/liba/libaio/libaio1_0.3.113-4_amd64.deb | ||
sudo dpkg -i libaio1_0.3.113-4_amd64.deb | ||
sudo apt-get install -f | ||
sudo apt-get install -y alien unixodbc-dev | ||
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm | ||
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm | ||
sudo alien -i --scripts oracle-instantclient*.rpm | ||
rm -f oracle-instantclient*.rpm | ||
<<<<<<< HEAD | ||
======= | ||
echo "export LD_LIBRARY_PATH=/usr/lib/oracle/19.6/client64/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | ||
echo "export C_INCLUDE_PATH=/usr/include/oracle/19.6/client64:$C_INCLUDE_PATH" >> $GITHUB_ENV | ||
echo "export CPLUS_INCLUDE_PATH=/usr/include/oracle/19.6/client64:$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV | ||
>>>>>>> 9879f3ea (chore(CE): Update Oracle Instant Client Installation (#723)) | ||
- name: Install FreeTDS for TinyTDS gem | ||
run: | | ||
sudo apt-get install libc6-dev | ||
wget http://www.freetds.org/files/stable/freetds-1.4.10.tar.gz | ||
tar -xzf freetds-1.4.10.tar.gz | ||
cd freetds-1.4.10 | ||
./configure --prefix=/usr/local --with-tdsver=7.4 | ||
sudo make | ||
sudo make install | ||
- name: Bundle Install | ||
run: bundle install | ||
working-directory: ./server | ||
- name: Database Setup | ||
run: bundle exec rake db:create db:schema:load --trace | ||
working-directory: ./server | ||
- name: Run RuboCop | ||
run: bundle exec rubocop | ||
working-directory: ./server | ||
- name: Run Tests | ||
run: bundle exec rspec | ||
working-directory: ./server | ||
- name: Install cc-test-reporter | ||
if: github.event_name == 'push' | ||
run: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
working-directory: ./server | ||
- name: Upload Coverage to Code Climate | ||
if: github.event_name == 'push' | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID_SERVER }} | ||
run: | | ||
./cc-test-reporter before-build | ||
./cc-test-reporter after-build --exit-code $? | ||
working-directory: ./server |