|
| 1 | +name: Anaconda Python Multi-Version Matrix Testing |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, master ] |
| 6 | + pull_request: |
| 7 | + branches: [ main, master ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + matrix-testing: |
| 11 | + name: Conda Test Matrix (Python ${{ matrix.python-version }} on ${{ matrix.os }}) |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + fail-fast: false # Don't stop testing other environments if one fails |
| 15 | + matrix: |
| 16 | + os: [ubuntu-latest, windows-latest] |
| 17 | + python-version: ["3.8", "3.9", "3.10", "3.11"] |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout Source Repository |
| 21 | + uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Spin Up Miniconda Environment Layer |
| 24 | + uses: conda-incubator/setup-miniconda@v3 |
| 25 | + with: |
| 26 | + auto-update-conda: true |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + activate-environment: test-env |
| 29 | + channels: conda-forge,defaults |
| 30 | + |
| 31 | + - name: Output Environment System Verification |
| 32 | + shell: bash -l {0} |
| 33 | + run: | |
| 34 | + conda info |
| 35 | + python --version |
| 36 | +
|
| 37 | + - name: Install Dependencies inside Conda Core |
| 38 | + shell: bash -l {0} |
| 39 | + run: | |
| 40 | + # Install production packages using conda mapping |
| 41 | + conda install --yes streamlit deep-translator gtts |
| 42 | + pip install anyascii # Fallback to pip for custom modules not native to conda distributions |
| 43 | + |
| 44 | + # Optional: install testing suite if you write pytest test cases |
| 45 | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| 46 | +
|
| 47 | + - name: Execute Automated Environment Validation Checks |
| 48 | + shell: bash -l {0} |
| 49 | + run: | |
| 50 | + # Test executing python calls across your underlying scripts |
| 51 | + python -m compileall . |
0 commit comments