mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -05:00
🔧 Set up Rust jobs in CI
This commit is contained in:
parent
230e011003
commit
ca70edf07b
2 changed files with 42 additions and 3 deletions
|
@ -44,7 +44,6 @@ jobs:
|
||||||
- ~/.m2
|
- ~/.m2
|
||||||
key: v1-dependencies-{{ checksum "common/deps.edn"}}
|
key: v1-dependencies-{{ checksum "common/deps.edn"}}
|
||||||
|
|
||||||
|
|
||||||
test-frontend:
|
test-frontend:
|
||||||
docker:
|
docker:
|
||||||
- image: penpotapp/devenv:latest
|
- image: penpotapp/devenv:latest
|
||||||
|
@ -93,7 +92,6 @@ jobs:
|
||||||
- ~/.m2
|
- ~/.m2
|
||||||
key: v1-dependencies-{{ checksum "frontend/deps.edn"}}
|
key: v1-dependencies-{{ checksum "frontend/deps.edn"}}
|
||||||
|
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
docker:
|
docker:
|
||||||
- image: penpotapp/devenv:latest
|
- image: penpotapp/devenv:latest
|
||||||
|
@ -180,7 +178,6 @@ jobs:
|
||||||
- ~/.m2
|
- ~/.m2
|
||||||
key: v1-dependencies-{{ checksum "backend/deps.edn" }}
|
key: v1-dependencies-{{ checksum "backend/deps.edn" }}
|
||||||
|
|
||||||
|
|
||||||
test-exporter:
|
test-exporter:
|
||||||
docker:
|
docker:
|
||||||
- image: penpotapp/devenv:latest
|
- image: penpotapp/devenv:latest
|
||||||
|
@ -210,6 +207,29 @@ jobs:
|
||||||
yarn run fmt:clj:check
|
yarn run fmt:clj:check
|
||||||
yarn run lint:clj
|
yarn run lint:clj
|
||||||
|
|
||||||
|
test-render-wasm:
|
||||||
|
docker:
|
||||||
|
- image: penpotapp/devenv:latest
|
||||||
|
|
||||||
|
working_directory: ~/repo
|
||||||
|
resource_class: medium+
|
||||||
|
environment:
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "fmt check"
|
||||||
|
working_directory: "./render-wasm"
|
||||||
|
command: |
|
||||||
|
cargo fmt --check
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "cargo tests"
|
||||||
|
working_directory: "./render-wasm"
|
||||||
|
command: |
|
||||||
|
cargo test
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
penpot:
|
penpot:
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -218,3 +238,4 @@ workflows:
|
||||||
- test-backend
|
- test-backend
|
||||||
- test-common
|
- test-common
|
||||||
- test-exporter
|
- test-exporter
|
||||||
|
- test-render-wasm
|
||||||
|
|
|
@ -150,3 +150,21 @@ impl Shape {
|
||||||
self.blend_mode = mode;
|
self.blend_mode = mode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
fn any_shape() -> Shape {
|
||||||
|
Shape::new(Uuid::nil())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn add_fill_pushes_a_new_fill() {
|
||||||
|
let mut shape = any_shape();
|
||||||
|
assert_eq!(shape.fills.len(), 0);
|
||||||
|
|
||||||
|
shape.add_fill(Fill::Solid(Color::TRANSPARENT));
|
||||||
|
assert_eq!(shape.fills.get(0), Some(&Fill::Solid(Color::TRANSPARENT)))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue