Skip to content

Commit

Permalink
Modify existing E2E job to run unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Weinberg <[email protected]>
  • Loading branch information
nathan-weinberg committed Jul 16, 2024
1 parent 1c17a00 commit 7b5a2d5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 102 deletions.
102 changes: 0 additions & 102 deletions .github/workflows/e2e.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: Apache-2.0

name: Test

on:
push:
branches:
- "main"
- "release-**"
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*.txt'
- '.github/workflows/e2e.yml'
pull_request:
branches:
- "main"
- "release-**"
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*.txt'
- '.github/workflows/e2e.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
unit:
runs-on: ubuntu-gpu
steps:
# No step-security/harden-runner since this is a self-hosted runner
- name: Checkout instructlab/eval
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
# https://github.com/actions/checkout/issues/249
fetch-depth: 0

- name: Setup Python 3.11
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.11
cache: pip
cache-dependency-path: |
**/pyproject.toml
**/requirements*.txt
- name: Install dependencies
run: |
python3.11 -m venv venv
. venv/bin/activate
python3.11 -m pip install .
- name: Run unit tests
run: |
. venv/bin/activate
python3 -m pytest
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# eval

![Lint](https://github.com/instructlab/eval/actions/workflows/lint.yml/badge.svg?branch=main)
![Test](https://github.com/instructlab/eval/actions/workflows/test.yml/badge.svg?branch=main)
![Build](https://github.com/instructlab/eval/actions/workflows/pypi.yaml/badge.svg?branch=main)
![Release](https://img.shields.io/github/v/release/instructlab/eval)
![License](https://img.shields.io/github/license/instructlab/eval)
Expand Down

0 comments on commit 7b5a2d5

Please sign in to comment.