diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..91b6ae6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + pull_request: + branches: + - main + push: + branches: + - github-ci + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build Docker image for testing + run: | + docker build --target test -t zephir-api2:test . + + - name: Run tests + run: | + docker run --rm zephir-api2:test + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: pytest-results + path: ./tests