Skip to content

feat: use data service sessions api #9679

feat: use data service sessions api

feat: use data service sessions api #9679

Workflow file for this run

name: Test and CI
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-client:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v4
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: "20.11.0"
- name: Install client dependencies
run: npm clean-install
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Run test client
run: npm run test
env:
CI: true
timeout-minutes: 1
- name: Run format client
run: npm run format-check
- name: Run lint client
run: npm run lint
- name: Build client
run: npm run build
env:
NODE_OPTIONS: "--max-old-space-size=4096"
test-server:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./server
steps:
- uses: actions/checkout@v4
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: "20.11.0"
- name: Install server dependencies
run: npm clean-install
- name: Build server
run: npm run build
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Run test server
run: npm test
env:
CI: true
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Run format server
run: npm run format-check
- name: Run lint server
run: npm run lint
test-storybook:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.11.0"
- name: Install dependencies
run: npm clean-install
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook and run tests
run: npm run storybook-compile-and-test
lint-e2e:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./tests
steps:
- uses: actions/checkout@v4
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: "20.11.0"
- name: Install project e2e dependencies
run: npm clean-install
- name: Run format e2e
run: npm run format-check
- name: Run lint e2e
run: npm run lint
run-e2e:
needs: lint-e2e
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install client
uses: cypress-io/github-action@v6
with:
build: npm run client:install
runTests: false
working-directory: tests
- name: Build client
uses: cypress-io/github-action@v6
with:
build: npm run client:build
runTests: false
working-directory: tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
browser: chrome
start: npm run client:preview
wait-on: http://localhost:3000/
wait-on-timeout: 300
working-directory: tests
- uses: actions/upload-artifact@v4
if: failure() # Cypress screenshots will be generated only if the test failed, thus we store screenshots only on failures
with:
name: cypress-screenshots
path: tests/cypress/screenshots
retention-days: 7
- uses: actions/upload-artifact@v4
if: always() # Cypress test video is always captured, so this action uses "always()" condition
with:
name: cypress-videos
path: tests/cypress/videos
retention-days: 3
publish-images:
needs: [test-client, test-server]
runs-on: ubuntu-22.04
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up environment variables
run: |
echo "GIT_USER=Renku Bot" >> $GITHUB_ENV
echo "GIT_EMAIL=renku@datascience.ch" >> $GITHUB_ENV
- name: Push images
uses: SwissDataScienceCenter/renku-actions/publish-chartpress-images@v1.12.3
env:
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
- name: Update ui version
uses: SwissDataScienceCenter/renku-actions/update-component-version@v1.12.3
env:
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
COMPONENT_NAME: renku-ui