|
| 1 | +name: Main |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + |
| 9 | +env: |
| 10 | + LANG: C.UTF-8 |
| 11 | + |
| 12 | +jobs: |
| 13 | + test: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + container: ghcr.io/apertium/apertium-apy-cicd |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: |
| 19 | + - "3.8" |
| 20 | + - "3.9" |
| 21 | + - "3.10" |
| 22 | + # - "3.11" |
| 23 | + # - "3.12" |
| 24 | + steps: |
| 25 | + - name: Checkout |
| 26 | + uses: actions/checkout@v4 |
| 27 | + |
| 28 | + - uses: actions/setup-python@v5 |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + cache: pipenv |
| 32 | + - name: Install Pipenv |
| 33 | + run: python -m pip install pipenv |
| 34 | + - name: Install Pip dependencies |
| 35 | + run: pipenv install --deploy --dev |
| 36 | + |
| 37 | + - name: Build |
| 38 | + run: pipenv run make |
| 39 | + |
| 40 | + - name: Setup Git user |
| 41 | + run: git config --global user.email "test@example.com" && git config --global user.name "test" |
| 42 | + - name: Test |
| 43 | + run: pipenv run make unit-test |
| 44 | + lint: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + container: ghcr.io/apertium/apertium-apy-cicd |
| 47 | + steps: |
| 48 | + - name: Checkout |
| 49 | + uses: actions/checkout@v4 |
| 50 | + |
| 51 | + - uses: actions/setup-python@v5 |
| 52 | + with: |
| 53 | + python-version: "3.10" |
| 54 | + cache: pipenv |
| 55 | + - name: Install Pipenv |
| 56 | + run: python -m pip install pipenv |
| 57 | + - name: Install Pip dependencies |
| 58 | + run: pipenv install --deploy --dev |
| 59 | + |
| 60 | + - name: Build |
| 61 | + run: pipenv run make |
| 62 | + |
| 63 | + - name: Lint |
| 64 | + run: pipenv run make lint |
| 65 | + coverage: |
| 66 | + runs-on: ubuntu-latest |
| 67 | + container: ghcr.io/apertium/apertium-apy-cicd |
| 68 | + steps: |
| 69 | + - name: Checkout |
| 70 | + uses: actions/checkout@v4 |
| 71 | + |
| 72 | + - uses: actions/setup-python@v5 |
| 73 | + with: |
| 74 | + python-version: "3.10" |
| 75 | + cache: pipenv |
| 76 | + - name: Install Pipenv |
| 77 | + run: python -m pip install pipenv |
| 78 | + - name: Install Pip dependencies |
| 79 | + run: pipenv install --deploy --dev |
| 80 | + |
| 81 | + - name: Build |
| 82 | + run: pipenv run make |
| 83 | + |
| 84 | + - name: Setup Git user |
| 85 | + run: git config --global user.email "test@example.com" && git config --global user.name "test" |
| 86 | + - name: Test |
| 87 | + run: pipenv run make coverage |
| 88 | + |
| 89 | + - name: Coveralls |
| 90 | + run: pipenv run coveralls --service=github |
| 91 | + env: |
| 92 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments