task-timewarrior-hook/.github/workflows/tests.yaml
dependabot[bot] 091d649035 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 16:10:56 +02:00

67 lines
2.2 KiB
YAML

name: tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Test
run: |
export PYTHONPATH=.
python3 -m venv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install pytest mockito
venv/bin/pytest test/test_on-modify_unit.py
e2e-tests:
needs: unit-tests
strategy:
fail-fast: false
matrix:
include:
- name: "task [stable] & timew [stable]"
runner: ubuntu-latest
container: task-stable-timew-stable
- name: "task [develop] & timew [stable]"
runner: ubuntu-latest
container: task-develop-timew-stable
- name: "task [stable] & timew [develop]"
runner: ubuntu-latest
container: task-stable-timew-develop
- name: "task [develop] & timew [develop]"
runner: ubuntu-latest
container: task-develop-timew-develop
runs-on: ${{ matrix.runner }}
continue-on-error: ${{ matrix.continue-on-error == true }}
steps:
- name: Create lowercase repository name
run: |
GHCR_REPOSITORY="${{ github.repository_owner }}"
echo "REPOSITORY=${GHCR_REPOSITORY,,}" >> ${GITHUB_ENV}
- uses: actions/checkout@v4
- name : Login to GHCR
uses : docker/login-action@v2.2.0
with :
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build ${{ matrix.name }}
env:
REGISTRY: ghcr.io
OWNER: ${{ env.REPOSITORY }}
GITHUB_USER: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER: ${{ matrix.container }}
run: docker-compose build ${CONTAINER}
- name: Test ${{ matrix.name }}
env:
REGISTRY: ghcr.io
OWNER: ${{ env.REPOSITORY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER: ${{ matrix.container }}
run: docker-compose run ${CONTAINER}