Skip to content

Bump DataJunction version to 0.0.15 #3883

Bump DataJunction version to 0.0.15

Bump DataJunction version to 0.0.15 #3883

Workflow file for this run

name: "PR Update : Run tests and linters"
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
outputs:
client: ${{ steps.filter.outputs.client }}
server: ${{ steps.filter.outputs.server }}
djqs: ${{ steps.filter.outputs.djqs }}
djrs: ${{ steps.filter.outputs.djrs }}
ui: ${{ steps.filter.outputs.ui }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
token: ''
filters: |
client:
- datajunction-clients/python/**
- '!datajunction-clients/python/datajunction/__about__.py'
server:
- datajunction-server/**
- '!datajunction-server/datajunction_server/__about__.py'
djqs:
- datajunction-query/**
- '!**/__about__.py'
djrs:
- datajunction-reflection/**
- '!**/__about__.py'
ui:
- datajunction-ui/**
- '!datajunction-ui/package.json'
predicate-quantifier: every
build:
needs: changes
env:
PDM_DEPS: 'urllib3<2'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
library: ['client', 'server', 'djqs', 'djrs']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: pdm-project/setup-pdm@v4
name: Setup PDM
with:
python-version: ${{ matrix.python-version }}
architecture: x64
prerelease: true
enable-pep582: true
- uses: pre-commit/[email protected]
name: Force check of all pdm.lock files
with:
extra_args: pdm-lock-check --all-files
- name: Run Tests
if: |
(matrix.library == 'client' && needs.changes.outputs.client == 'true') ||
(matrix.library == 'server' && needs.changes.outputs.server == 'true') ||
(matrix.library == 'djqs' && needs.changes.outputs.djqs == 'true') ||
(matrix.library == 'djrs' && needs.changes.outputs.djrs == 'true')
run: |
echo "Testing ${{ matrix.library }} ..."
export TEST_DIR=${{ matrix.library == 'server' && './datajunction-server' || matrix.library == 'client' && './datajunction-clients/python' || matrix.library == 'djqs' && './datajunction-query' || matrix.library == 'djrs' && './datajunction-reflection'}}
# Install dependencies
pdm sync -d; cd $TEST_DIR; pdm install -d -G pandas -G transpilation -G test;
# Run linters
pdm run pre-commit run --all-files
# Run tests
export MODULE=${{ matrix.library == 'server' && 'datajunction_server' || matrix.library == 'client' && 'datajunction' || matrix.library == 'djqs' && 'djqs' || matrix.library == 'djrs' && 'datajunction_reflection'}}
pdm run pytest ${{ (matrix.library == 'server' || matrix.library == 'client') && '-n auto' || '' }} --cov-fail-under=100 --cov=$MODULE --cov-report term-missing -vv tests/ --doctest-modules $MODULE --without-integration --without-slow-integration --ignore=datajunction_server/alembic/env.py
build-javascript:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dev Dependencies
run: npm install --only=dev
working-directory: ./datajunction-clients/javascript
- name: Build Javascript Client
run: npm run build
working-directory: ./datajunction-clients/javascript
- name: Lint Javascript Client
run: npm run lint
working-directory: ./datajunction-clients/javascript
build-ui:
needs: changes
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./datajunction-ui
strategy:
matrix:
node-version: [19.x]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
if: ${{ needs.changes.outputs.ui == 'true' }}
run: yarn install
- name: Run Lint and Prettier
if: ${{ needs.changes.outputs.ui == 'true' }}
run: |
yarn lint --fix
yarn prettier . --write
git diff --exit-code
- name: Run Unit Tests and Build
if: ${{ needs.changes.outputs.ui == 'true' }}
run: |
yarn test --runInBand --ci --coverage
yarn webpack-build
build-java:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./datajunction-clients/java
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build -x test