Skip to content

Merge pull request #15 from eevanlai-stack/revert-2-cursor/process-re… #26

Merge pull request #15 from eevanlai-stack/revert-2-cursor/process-re…

Merge pull request #15 from eevanlai-stack/revert-2-cursor/process-re… #26

name: Python Package using Conda
on:
push:
branches:
-main
-release/*
on:

Check failure on line 8 in .github/workflows/python-package-conda.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/python-package-conda.yml

Invalid workflow file

You have an error in your yaml syntax on line 8
pull_request:
branches:
- main
on:
schedule:
- cron: "0 2 * * 1-5"
on:
workflow_dispatch:
jobs:
my_job:
name: deploy to staging
runs-on: ubuntu-22.04
max-parallel: 5
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: npm install
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pjobs:
test:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18.x', '20.x']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm testytest
pytest