From c0393713115df7e3f7269bd9a3a35394232e126f Mon Sep 17 00:00:00 2001 From: Ben Bartling Date: Mon, 12 Aug 2024 08:09:56 -0500 Subject: [PATCH] Add GitHub Actions CI workflow for code formatting and tests --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d3d2b10 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' # or your required Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install black pytest + + - name: Run Black + run: | + black --check open_fdd/ tests/ + + - name: Run tests + run: | + pytest tests/