From bd81bc42ba979db6b2924069fddaeaeedb4142ae Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Wed, 07 Sep 2022 20:50:46 +0100 Subject: [PATCH] Run lints over frontend --- .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 -- rgit 0.1.3