From 5f85220158938684131832ab3166ea43e65370aa Mon Sep 17 00:00:00 2001 From: OlivierDehaene <23298448+OlivierDehaene@users.noreply.github.com> Date: Thu, 8 Dec 2022 18:42:25 +0100 Subject: [PATCH] add workflow --- .github/workflows/server-tests.yaml | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/server-tests.yaml diff --git a/.github/workflows/server-tests.yaml b/.github/workflows/server-tests.yaml new file mode 100644 index 00000000..4ae22e88 --- /dev/null +++ b/.github/workflows/server-tests.yaml @@ -0,0 +1,30 @@ +name: Server tests + +on: + pull_request: + paths: + - ".github/workflows/server-tests.yaml" + - "server/**" + +jobs: + run_tests: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Loading cache. + uses: actions/cache@v2 + id: model_cache + with: + path: ~/.cache/huggingface/ + key: models + - name: Install dependencies + run: | + make install-server + pip install pytest + - name: Run tests (shard) + run: | + pytest -sv server/tests