🏡 index : ~doyle/chartered.git

author Jordan Doyle <jordan@doyle.la> 2022-09-07 20:50:46.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2022-09-07 20:50:46.0 +01:00:00
commit
bd81bc42ba979db6b2924069fddaeaeedb4142ae [patch]
tree
650488f89994f033cf4c4f36eaeb8e8d0f7fbfdc
parent
21afdcb7410364bd794802332fe7612f898396eb
download
bd81bc42ba979db6b2924069fddaeaeedb4142ae.tar.gz

Run lints over frontend



Diff

 .github/workflows/integration-tests.yml | 40 ----------------------------------------
 .github/workflows/ui.yml                | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 40 deletions(-)

diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
deleted file mode 100644
index 23d7a85..0000000 100644
--- a/.github/workflows/integration-tests.yml
+++ /dev/null
@@ -1,40 +1,0 @@
on: [push, pull_request]

name: CI - Integration Tests

jobs:
  e2e-ui-test:
    name: End-to-end UI tests
    runs-on: ubuntu-22.04 # needed for recent sqlite version
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions/setup-node@v2
        with:
          node-version: '18'
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: -p chartered-web -p chartered-db --features sqlite
      - name: Install dependencies
        working-directory: ./chartered-frontend
        run: npm ci
      - name: Install Playwright
        working-directory: ./chartered-frontend
        run: npx playwright install --with-deps
      - name: Run tests
        working-directory: ./chartered-frontend
        run: |

          ../target/debug/chartered-web -c ../chartered-web/config-example.toml &
          sleep 5
          npm test
      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v2
        with:
          name: playwright-report
          path: playwright-report
diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml
new file mode 100644
index 0000000..d32aa3e 100644
--- /dev/null
+++ a/.github/workflows/ui.yml
@@ -1,0 +1,56 @@
on: [push, pull_request]

name: UI CI

jobs:
  e2e-ui-test:
    name: End-to-end UI tests
    runs-on: ubuntu-22.04 # needed for recent sqlite version
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions/setup-node@v2
        with:
          node-version: '18'
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: -p chartered-web -p chartered-db --features sqlite
      - name: Install dependencies
        working-directory: ./chartered-frontend
        run: npm ci
      - name: Install Playwright
        working-directory: ./chartered-frontend
        run: npx playwright install --with-deps
      - name: Run tests
        working-directory: ./chartered-frontend
        run: |

          ../target/debug/chartered-web -c ../chartered-web/config-example.toml &
          sleep 5
          npm test
      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v2
        with:
          name: playwright-report
          path: playwright-report

  lint:
    name: Prettier formatting
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v2
        with:
          node-version: '18'
      - name: Install dependencies
        working-directory: ./chartered-frontend
        run: npm ci
      - name: Run tests
        working-directory: ./chartered-frontend
        run: |

          npm run lint