diff --git a/.github/workflows/enforcer.yaml b/.github/workflows/enforcer.yaml new file mode 100644 index 0000000..2e0ad50 --- /dev/null +++ b/.github/workflows/enforcer.yaml @@ -0,0 +1,16 @@ +name: 'Check Branch' + +on: + pull_request: + branches: + - base + +jobs: + check_branch: + runs-on: ubuntu-latest + steps: + - name: Check branch + if: github.head_ref != 'development' + run: | + echo "ERROR: You can only merge to base from the development branch." + exit 1 \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..2dd39f6 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: Test + +on: + pull_request: + branches: + - development + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + toxenv: [py310, linting] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + + - name: Install dependencies + run: pip install -r test_requirements.txt + + - name: Run tox + run: tox + env: + TOXENV: ${{ matrix.toxenv }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8ead11b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -dist: bionic - -language: python -cache: pip - -before_script: - - pip install -r test_requirements.txt - -script: tox - -matrix: - include: - - - python: "3.10" - env: TOXENV=py310 - - # Linters - - - python: "3.10" - env: TOXENV=linting - -notifications: - email: false diff --git a/README.md b/README.md index 648df2c..0082e65 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ Helpers for Elasticsearch, including Analyzers and Documents. -[![Build Status](https://travis-ci.org/RockefellerArchiveCenter/rac_es.svg?branch=base)](https://travis-ci.org/RockefellerArchiveCenter/rac_es) ## Setup