Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format check gh action #366

Merged
merged 9 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 45 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- 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
3 changes: 2 additions & 1 deletion ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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"
}
}
12 changes: 12 additions & 0 deletions ui/src/routes/Namespace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ const NamespacePage = () => {

return (
<Stack direction="column" spacing={3}>
<Box display={"flex"} alignItems={"center"}>
<CircleIcon
sx={{
width: "30px",
color: stringToColor(client.namespace),
mr: 1,
}}
/>
<Typography variant="h2" component="h1">
{client.namespace}
</Typography>
</Box>
<ExtractionPoliciesTable
namespace={client.namespace}
extractionPolicies={client.extractionPolicies}
Expand Down
Loading