File tree Expand file tree Collapse file tree 2 files changed +50
-17
lines changed Expand file tree Collapse file tree 2 files changed +50
-17
lines changed Original file line number Diff line number Diff line change 1+ name : Concerto Conformance Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ conformance :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout Target Project
17+ uses : actions/checkout@v3
18+
19+ - name : Setup Node.js
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : 18
23+
24+ - name : Checkout Conformance Suite
25+ uses : actions/checkout@v3
26+ with :
27+ repository : accordproject/concerto-conformance
28+ path : concerto-conformance
29+
30+ - name : Install Conformance Suite Dependencies
31+ working-directory : concerto-conformance
32+ run : npm install
33+
34+ - name : Install Rust
35+ uses : actions-rs/toolchain@v1
36+ with :
37+ toolchain : stable
38+ override : true
39+
40+ - name : Run Rust-based Conformance Tests
41+ run : cargo run --manifest-path concerto-conformance/semantic/features/support/rust/cucumber_tests/Cargo.toml
Original file line number Diff line number Diff line change @@ -11,29 +11,21 @@ use crate::validation::Validate;
1111pub struct ModelFile {
1212 /// The metamodel representation
1313 pub model : Model ,
14-
15- /// Content of the model file
1614 pub content : String ,
15+ pub file_name : String ,
1716}
1817
1918impl ModelFile {
2019 /// Creates a new model file
21- pub fn new ( namespace : String , version : Option < String > ) -> Self {
22- let model = Model {
23- _class : "[email protected] " . to_string ( ) , 24- namespace,
25- concerto_version : version,
26- source_uri : None ,
27- imports : None ,
28- declarations : None ,
29- decorators : None ,
30- } ;
31-
32- ModelFile {
33- model,
34- content : String :: new ( ) ,
35- }
20+
21+ pub fn new ( model : Model , content : String , file_name : String ) -> Self {
22+ ModelFile { model, content, file_name }
3623 }
24+ pub fn get_name ( & self ) -> String {
25+ self . model . namespace . clone ( )
26+ }
27+
28+
3729
3830 /// Loads a model file from a string
3931 pub fn from_string ( content : String ) -> Result < Self , ConcertoError > {
You can’t perform that action at this time.
0 commit comments