diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 84af2afe4..be8781ea8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,29 +2,57 @@ name: Tests on: push: branches: - - 'main' + - "main" pull_request: - branches: - - 'main' + branches: + - "main" env: CARGO_TERM_COLOR: always jobs: + lint: + name: Lint Checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Npm Install + run: cd ui && npm install + + - name: UI Lint Check + run: cd ui && npm run lint + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: rustfmt + override: true + + - name: Rust Format Check + run: | + cargo +nightly fmt -- --check test: + name: Run Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Install protoc - run: sudo apt install -y protobuf-compiler npm - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Test - run: ./run_tests.sh - - name: Clear up space - run: | - docker stop --time 90 $(docker ps -aq) || true - docker rm --force $(docker ps -aq) || true - docker rmi --force $(docker images -aq) || true \ No newline at end of file + - uses: actions/checkout@v3 + - name: Install protoc + run: sudo apt install -y protobuf-compiler npm + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Test + run: ./run_tests.sh + - name: Clear up space + run: | + docker stop --time 90 $(docker ps -aq) || true + docker rm --force $(docker ps -aq) || true + docker rmi --force $(docker images -aq) || true diff --git a/ui/package-lock.json b/ui/package-lock.json index a37c8af1e..01313df03 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -33,7 +33,8 @@ "web-vitals": "^2.1.4" }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.21.11" + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", + "eslint": "^8.56.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/ui/package.json b/ui/package.json index 7127b9bfa..b36dd57d8 100644 --- a/ui/package.json +++ b/ui/package.json @@ -33,7 +33,8 @@ "dev": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "lint": "npx eslint --max-warnings 0 ./src" }, "eslintConfig": { "extends": [ @@ -54,6 +55,7 @@ ] }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.21.11" + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", + "eslint": "^8.56.0" } } diff --git a/ui/src/routes/Namespace/index.tsx b/ui/src/routes/Namespace/index.tsx index 01190b218..1ca77d5c3 100644 --- a/ui/src/routes/Namespace/index.tsx +++ b/ui/src/routes/Namespace/index.tsx @@ -30,6 +30,18 @@ const NamespacePage = () => { return ( + + + + {client.namespace} + +