|
| 1 | +on: [pull_request] |
| 2 | +name: CI |
| 3 | +jobs: |
| 4 | + # run python/js tests, coveralls and lint |
| 5 | + integration-test: |
| 6 | + name: python ${{ matrix.python-version }} |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + services: |
| 9 | + postgres: |
| 10 | + image: postgres:11 |
| 11 | + env: |
| 12 | + POSTGRES_USER: postgres |
| 13 | + POSTGRES_PASSWORD: postgres |
| 14 | + POSTGRES_DB: ci_db_test |
| 15 | + ports: |
| 16 | + - 5432:5432 |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + os: |
| 21 | + - ubuntu-20.04 |
| 22 | + python-version: |
| 23 | + - 3.6 |
| 24 | + - 3.7 |
| 25 | + - 3.8 |
| 26 | + - 3.9 |
| 27 | + steps: |
| 28 | + - name: Checkout |
| 29 | + uses: actions/checkout@v2 |
| 30 | + - name: Set up Python ${{ matrix.python-version }} |
| 31 | + uses: actions/setup-python@v2 |
| 32 | + with: |
| 33 | + python-version: ${{ matrix.python-version }} |
| 34 | + - name: Set up ruby for coveralls |
| 35 | + uses: actions/setup-ruby@v1 |
| 36 | + - name: Set up js |
| 37 | + uses: actions/setup-node@v1 |
| 38 | + - name: Install js dependencies |
| 39 | + |
| 40 | + - name: Install opal |
| 41 | + run: pip install -e . |
| 42 | + - name: Install dependencies |
| 43 | + run: pip install -r test-requirements.txt |
| 44 | + - run: gem install coveralls-lcov |
| 45 | + - name: run tests |
| 46 | + run: opal test --coverage |
| 47 | + - name: flake8 |
| 48 | + run: flake8 |
| 49 | + - name: combine coveralls |
| 50 | + run: find coverage -name "lcov.info" -exec coveralls-lcov -v -n {} \; > coverage/coverage.json |
| 51 | + - run: coveralls --merge=coverage/coverage.json |
| 52 | + env: |
| 53 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" |
| 54 | + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
| 55 | + # make sure the python side of things works on windows |
| 56 | + other-os-tests: |
| 57 | + name: ${{ matrix.os }} python ${{ matrix.python-version }} |
| 58 | + runs-on: ${{ matrix.os }} |
| 59 | + strategy: |
| 60 | + fail-fast: false |
| 61 | + matrix: |
| 62 | + os: |
| 63 | + - windows-latest |
| 64 | + python-version: |
| 65 | + - 3.9 |
| 66 | + steps: |
| 67 | + - name: Checkout |
| 68 | + uses: actions/checkout@v2 |
| 69 | + - name: Set up Python ${{ matrix.python-version }} |
| 70 | + uses: actions/setup-python@v2 |
| 71 | + with: |
| 72 | + python-version: ${{ matrix.python-version }} |
| 73 | + - name: Install opal |
| 74 | + run: pip install -e . |
| 75 | + - name: Install dependencies |
| 76 | + run: pip install -r test-requirements.txt |
| 77 | + - name: run tests |
| 78 | + run: opal test py |
0 commit comments