|  | 
|  | 1 | +name: 🧪📦 Test packages | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | +  schedule: | 
|  | 5 | +    - cron: "0 7 * * 1" | 
|  | 6 | + | 
|  | 7 | +jobs: | 
|  | 8 | +  run-tests-with-pip: | 
|  | 9 | +    name: Run tests with Symfem installed from pip | 
|  | 10 | +    runs-on: ubuntu-latest | 
|  | 11 | +    strategy: | 
|  | 12 | +      matrix: | 
|  | 13 | +        python-version: [3.7, 3.8] | 
|  | 14 | +    steps: | 
|  | 15 | +      - name: Set up Python | 
|  | 16 | +        uses: actions/setup-python@v2 | 
|  | 17 | +        with: | 
|  | 18 | +          python-version: ${{ matrix.python-version }} | 
|  | 19 | +      - uses: actions/checkout@v2 | 
|  | 20 | +        with: | 
|  | 21 | +          ref: v2021.7.5 | 
|  | 22 | +        name: Get latest Symfem version | 
|  | 23 | +      - run: rm -rf symfem VERSION | 
|  | 24 | +        name: Remove downloaded symfem | 
|  | 25 | +      - run: python3 -m pip install symfem | 
|  | 26 | +        name: Install Symfem | 
|  | 27 | +      - run: pip install pytest | 
|  | 28 | +        name: Install pytest | 
|  | 29 | +      - run: python3 -m pytest test/ | 
|  | 30 | +        name: Run unit tests | 
|  | 31 | +      - run: python3 -m pytest demo/test_demos.py | 
|  | 32 | +        name: Run demos | 
|  | 33 | + | 
|  | 34 | +  run-tests-with-conda: | 
|  | 35 | +    name: Run tests with Symfem installed from conda-forge | 
|  | 36 | +    runs-on: ubuntu-latest | 
|  | 37 | +    strategy: | 
|  | 38 | +      matrix: | 
|  | 39 | +        python-version: [3.7, 3.8] | 
|  | 40 | +    steps: | 
|  | 41 | +      - uses: conda-incubator/setup-miniconda@v2 | 
|  | 42 | +        with: | 
|  | 43 | +          auto-update-conda: true | 
|  | 44 | +          python-version: ${{ matrix.python-version }} | 
|  | 45 | +          activate-environment: symfem | 
|  | 46 | +      - uses: actions/checkout@v2 | 
|  | 47 | +        with: | 
|  | 48 | +          ref: v2021.7.5 | 
|  | 49 | +        name: Get latest Symfem version | 
|  | 50 | +      - run: rm -rf symfem VERSION | 
|  | 51 | +        name: Remove downloaded symfem | 
|  | 52 | +      - run: | | 
|  | 53 | +          conda config --add channels conda-forge | 
|  | 54 | +          conda config --set channel_priority strict | 
|  | 55 | +          conda install symfem | 
|  | 56 | +          conda install pytest | 
|  | 57 | +          pytest test/ | 
|  | 58 | +          pytest demo/test_demos.py | 
|  | 59 | +        shell: bash -l {0} | 
|  | 60 | +        name: Install Symfem and run tests | 
|  | 61 | +
 | 
|  | 62 | +  run-test-with-pypi-zip: | 
|  | 63 | +    name: Run tests with Symfem downloaded from PyPI | 
|  | 64 | +    runs-on: ubuntu-latest | 
|  | 65 | +    strategy: | 
|  | 66 | +      matrix: | 
|  | 67 | +        python-version: [3.7, 3.8] | 
|  | 68 | +    steps: | 
|  | 69 | +      - name: Set up Python | 
|  | 70 | +        uses: actions/setup-python@v2 | 
|  | 71 | +        with: | 
|  | 72 | +          python-version: ${{ matrix.python-version }} | 
|  | 73 | +      - run: | | 
|  | 74 | +          wget -O symfem.tar.gz https://pypi.io/packages/source/s/symfem/symfem-2021.7.5.tar.gz | 
|  | 75 | +          tar -xvzf symfem.tar.gz | 
|  | 76 | +        name: Download and unpack latest version of Symfem | 
|  | 77 | +      - run: pip install pytest sympy numpy | 
|  | 78 | +        name: Install pytest, sympy and numpy | 
|  | 79 | +      - run: | | 
|  | 80 | +          cd symfem-2021.7.5 | 
|  | 81 | +          python3 -m pytest test/ | 
|  | 82 | +          python3 -m pytest demo/test_demos.py | 
|  | 83 | +        name: Run tests and demos | 
0 commit comments