diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8112a76..624187b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,21 +12,27 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Set up Node.js + uses: actions/setup-node@v4 with: - python-version: '3.11' + node-version: '20' + cache: 'npm' + cache-dependency-path: type-from-json/package-lock.json - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -e ".[dev]" - - - name: Run tests - run: pytest tests/ -v --cov=src + cd type-from-json + npm ci - name: Run linting - run: ruff check src/ tests/ + run: | + cd type-from-json + npm run lint + + - name: Run tests + run: | + cd type-from-json + npm test build: needs: test @@ -34,24 +40,25 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Set up Node.js + uses: actions/setup-node@v4 with: - python-version: '3.11' - cache: 'pip' + node-version: '20' + cache: 'npm' + cache-dependency-path: type-from-json/package-lock.json - name: Install dependencies run: | - pip install --upgrade pip - pip install . + cd type-from-json + npm ci - - name: Build package + - name: Build project run: | - pip install build - python -m build + cd type-from-json + npm run build - - name: Upload package + - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: dist - path: dist/ + path: type-from-json/dist/