name: Data Wrangler CI/CD on: push: branches: - main pull_request: branches: - main jobs: test: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.11' - name: Install Dependencies run: | python -m pip install --upgrade pip pip install -r server/requirements.txt pip install pytest openenv - name: Run Tests run: | pytest tests/ -v deploy_hf_space: needs: test if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v3 with: fetch-depth: 0 - name: Push to Hugging Face env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" git remote add hf https://user:$HF_TOKEN@huggingface.co/spaces/KnightBlade/data_wrangler git push -f hf main