From 6f1e95dbf909f8fb23bcd2791a56024e438b111a Mon Sep 17 00:00:00 2001 From: Cameron Lamb Date: Thu, 21 Mar 2024 15:36:23 +0000 Subject: [PATCH] Split CI --- .github/workflows/bdd.yml | 43 ++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 15 +++---------- .github/workflows/pytest.yml | 43 ++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/bdd.yml create mode 100644 .github/workflows/pytest.yml diff --git a/.github/workflows/bdd.yml b/.github/workflows/bdd.yml new file mode 100644 index 00000000..cfb4153d --- /dev/null +++ b/.github/workflows/bdd.yml @@ -0,0 +1,43 @@ +name: BDD + +on: + pull_request: + merge_group: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: browser-actions/setup-chrome@v1 + + - name: Create a .env file + run: cp .env.ci .env + + - name: Build images + run: make build + + - name: Run containers + run: make up-detatched + + - name: Install React app + run: npm ci + + - name: Collect static + run: make collectstatic + + - name: Run BDD tests + run: make bdd + + - name: Docker compose down + run: docker compose down diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19dcd373..a1828fa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: FFT CI +name: Code formatting and linting on: pull_request: @@ -20,7 +20,7 @@ jobs: node-version: 18 - uses: browser-actions/setup-chrome@v1 - + - name: Create a .env file run: cp .env.ci .env @@ -41,15 +41,6 @@ jobs: - name: Run isort run: make isort-check - + - name: Run black run: make black-check - - - name: Run tests - run: make pytest - - - name: Run BDD tests - run: make bdd - - - name: Docker compose down - run: docker compose down \ No newline at end of file diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 00000000..1fd7f298 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,43 @@ +name: Pytest + +on: + pull_request: + merge_group: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: browser-actions/setup-chrome@v1 + + - name: Create a .env file + run: cp .env.ci .env + + - name: Build images + run: make build + + - name: Run containers + run: make up-detatched + + - name: Install React app + run: npm ci + + - name: Collect static + run: make collectstatic + + - name: Run tests + run: make pytest + + - name: Docker compose down + run: docker compose down