diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 00000000..e8a302ea --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,24 @@ +name: Check + +on: + - push + - pull_request + +jobs: + linter: + runs-on: ubuntu-latest + if: ${{ !startsWith(github.ref, 'refs/tags') }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + + - name: Install dependencies + run: python -m pip install tox + + - name: Run + run: tox -e linter diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..ef62bb1b --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,93 @@ +# Based on https://fedoramagazine.org/github-actions-use-podman-to-run-fedora-linux/ + +name: CI +on: + pull_request: + +jobs: + unit: + name: unit + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python-version: + - "3.11" + - "3.12" + + steps: + - name: Get source + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: python -m pip install tox + + - name: Run tests + run: tox -e py + + # bootstrap: + # name: bootstrap-langchain + # runs-on: ubuntu-latest + + # strategy: + # fail-fast: false + # matrix: + # python-version: + # - "3.9" + # - "3.12" + + # steps: + # - name: Get source + # uses: actions/checkout@v4 + + # - name: Setup Podman + # run: | + # sudo apt update + # sudo apt-get -y install podman + # podman pull fedora:39 + + # - name: Create container + # run: | + # podman build --tag test-${{ matrix.python-version }} -f ./Containerfile + + # - name: Run tests + # run: | + # PYTHON=python${{ matrix.python-version }} ./test_container.sh + + # e2e: + # name: e2e + # runs-on: ubuntu-latest + + # strategy: + # fail-fast: false + # matrix: + # python-version: + # - "3.9" + # - "3.12" + # test-script: + # - e2e/test_rebuild_following_bootstrap.sh + + # steps: + # - name: Get source + # uses: actions/checkout@v4 + + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ matrix.python-version }} + + # - name: Setup Podman + # run: | + # sudo apt update + # sudo apt-get -y install podman + # podman pull fedora:39 + + # - name: Run tests + # run: | + # PYTHON=python${{ matrix.python-version }} ${{ matrix.test-script }}