From 221e7e78867f6dac634b146215002f428900972f Mon Sep 17 00:00:00 2001 From: Manuel Candales Date: Mon, 1 Jul 2024 13:06:52 -0700 Subject: [PATCH] Setup GitHub CI (#4) Summary: Pull Request resolved: https://github.com/pytorch-labs/FACTO/pull/4 Reviewed By: cbilgin Differential Revision: D59165435 fbshipit-source-id: 1eabeb7456ffc399dcb30b96b1f7c0c9ee528f67 --- .github/workflows/python-app.yml | 33 ++++++++++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/python-app.yml create mode 100644 requirements.txt diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..65686ff --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,33 @@ +name: Python CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Run tests + run: | + python -m unittest discover -s test -p "*.py" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..12c6d5d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +torch