summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: 2ba3f2132bb08118b4c065ba75b59940c60ea4ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
on:
  push:
    branches:
      - develop
  pull_request:
    branches:
      - develop

jobs:
  build:
    name: "Build mod_wsgi packages"
    runs-on: "ubuntu-20.04"
    steps:
      - uses: "actions/checkout@v2"
      - uses: "actions/setup-python@v2"
        with:
          python-version: "3.9"
      - name: "Install Apache package"
        run: sudo apt install -y apache2-dev
      - name: "Build mod_wsgi packages"
        run: ./package.sh && ls -las dist
      - name: "Store built packages"
        uses: actions/upload-artifact@v2
        with:
          name: dist
          path: dist/*

  tests:
    name: "Test mod_wsgi package (Python ${{ matrix.python-version }})"
    runs-on: "ubuntu-20.04"
    needs:
    - build
    strategy:
      fail-fast: false
      matrix:
        python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10-dev"]
    steps:
      - uses: "actions/checkout@v2"
      - uses: "actions/setup-python@v2"
        with:
          python-version: "${{ matrix.python-version }}"
      - name: "Download built packages"
        uses: actions/download-artifact@v2
        with:
            name: dist
            path: dist
      - name: "Install Apache package"
        run: sudo apt install -y apache2-dev
      - name: "Update pip installation"
        run: python -m pip install --upgrade pip setuptools wheel
      - name: "Install mod_wsgi"
        run: python -m pip install --verbose dist/mod_wsgi-[0-9].*.tar.gz
      - name: "Run mod_wsgi-express test #1"
        run: scripts/run-single-test.sh
      - name: "Uninstall mod_wsgi"
        run: pip uninstall mod_wsgi
      - name: "Install mod_wsgi-standalone"
        run: python -m pip install --verbose dist/mod_wsgi-[0-9].*.tar.gz
      - name: "Run mod_wsgi-express test #2"
        run: scripts/run-single-test.sh
      - name: "Uninstall mod_wsgi-standalone"
        run: pip uninstall mod_wsgi-standalone
      - name: "Verify configure/make/make install"
        run: ./configure && make && sudo make install