Skip to content

Commit

Permalink
CI work
Browse files Browse the repository at this point in the history
  • Loading branch information
chance-sematic committed Dec 16, 2024
1 parent 19763d9 commit 21c5c3b
Showing 1 changed file with 83 additions and 31 deletions.
114 changes: 83 additions & 31 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,96 @@ on:
push

jobs:
test-python:
# test-python:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Py-prep
# run: make py-prep
# - name: Test
# run: |
# source .venv/bin/activate
# pytest
# - name: Check Schemas
# run: git checkout . && make migrate_up_sqlite && make update-schema && git diff --exit-code
# - name: Wheel
# run: |
# make ui
# make uv-wheel
# - uses: actions/upload-artifact@v4
# with:
# name: sematic-wheel
# path: "./dist/sematic-*.whl"
# retention-days: 10
# - uses: actions/upload-artifact@v4
# with:
# name: sematic-wheel-test
# path: "sematic/tests/integration/test_pip_install.sh"
# retention-days: 1
# test-install:
# needs: test-python
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: sematic-wheel
# path: "./dist"
# - uses: actions/download-artifact@v4
# with:
# name: sematic-wheel-test
# path: "./"
# - name: Test and Install Wheel
# run: "bash test_pip_install.sh"

nodejs-init:
runs-on: ubuntu-latest
container:
image: cypress/browsers:22.12.0
options: --user 0
steps:
# - name: build-essential
# run: apt update && apt-get install -y build-essential curl wget
# - name: install uv
# run: wget -qO- https://astral.sh/uv/install.sh | sh
- name: Checkout code
uses: actions/checkout@v4
- name: Py-prep
run: make py-prep
- name: Test
run: |
source .venv/bin/activate
pytest
- name: Check Schemas
run: git checkout . && make migrate_up_sqlite && make update-schema && git diff --exit-code
- name: Wheel
# - name: Py-prep
# run: make py-prep
- name: npm install
run: npm ci
working-directory: ./sematic/ui
- name: write env vars
run: |
make ui
make uv-wheel
- uses: actions/upload-artifact@v4
echo "CYPRESS_CACHE_FOLDER=$CYPRESS_CACHE_FOLDER" >> $GITHUB_ENV
echo "PROJECT_FOLDER=$(pwd)" >> $GITHUB_ENV
- name: Persist
uses: actions/upload-artifact@v4
with:
name: sematic-wheel
path: "./dist/sematic-*.whl"
retention-days: 10
- uses: actions/upload-artifact@v4
with:
name: sematic-wheel-test
path: "sematic/tests/integration/test_pip_install.sh"
retention-days: 1
test-install:
needs: test-python
name: nodejs-cache
path: |
${{ env.CYPRESS_CACHE_FOLDER }}
${{ env.PROJECT_FOLDER }}
include-hidden-files: true


nodejs-lint:
needs: nodejs-init
runs-on: ubuntu-latest
container:
image: cypress/browsers:22.12.0
options: --user 0
steps:
- name: build-essential
run: apt update && apt-get install -y build-essential curl wget sudo
- uses: actions/download-artifact@v4
with:
name: sematic-wheel
path: "./dist"
- uses: actions/download-artifact@v4
with:
name: sematic-wheel-test
path: "./"
- name: Test and Install Wheel
run: "bash test_pip_install.sh"
name: nodejs-cache
path: /
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: lint
run: npm run lint
working-directory: sematic/ui


0 comments on commit 21c5c3b

Please sign in to comment.