File tree Expand file tree Collapse file tree 21 files changed +549
-113
lines changed Expand file tree Collapse file tree 21 files changed +549
-113
lines changed Original file line number Diff line number Diff line change 1+ name : Bundler Tests
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+ workflow_dispatch :
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ bundler-tests :
16+ name : Bundler Integration Tests
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Build Docker image
24+ run : docker build -f Dockerfile.dev -t metassr-test .
25+
26+ - name : Run bundler tests in Docker
27+ run : |
28+ docker run --rm -v $(pwd)/tests/web-app/dist:/root/tests/web-app/dist metassr-test bash -c "
29+ # Run the build
30+ cd /root/tests/web-app
31+ npm run build
32+
33+ # Copy the test script into the container and run it
34+ cp /root/tests/test-bundle.sh ./
35+ chmod +x test-bundle.sh
36+ ./test-bundle.sh
37+ "
38+
39+ - name : Upload dist artifacts
40+ if : always()
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : bundler-dist-output
44+ path : tests/web-app/dist/
45+ retention-days : 7
Original file line number Diff line number Diff line change 1+ name : Rust Clippy
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+ workflow_dispatch :
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ clippy :
16+ name : Run Clippy
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Install Rust
24+ uses : dtolnay/rust-toolchain@stable
25+ with :
26+ components : clippy
27+
28+ - name : Cache Rust dependencies
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ ~/.cargo/bin/
33+ ~/.cargo/registry/index/
34+ ~/.cargo/registry/cache/
35+ ~/.cargo/git/db/
36+ target/
37+ key : ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
38+
39+ - name : Run clippy
40+ run : cargo clippy --all-targets --all-features -- -D warnings
Original file line number Diff line number Diff line change 1+ name : Rust Formatting
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+ workflow_dispatch :
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ fmt :
16+ name : Check Formatting
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Install Rust
24+ uses : dtolnay/rust-toolchain@stable
25+ with :
26+ components : rustfmt
27+
28+ - name : Check formatting
29+ run : cargo fmt --check
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Spell Checker action
2+ on : [pull_request, push]
3+
4+ jobs :
5+ run :
6+ name : Start Spell Checking with Typos
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Checkout Actions Repository
10+ uses : actions/checkout@v2
11+
12+ - name : Check spelling of * Files
13+ uses : crate-ci/typos@master
14+ with :
15+ files : ./*
Original file line number Diff line number Diff line change 1+ name : Rust Tests
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+ workflow_dispatch :
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ test :
16+ name : Run Rust Tests
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Build Docker image
24+ run : docker build -f Dockerfile.dev -t metassr-test .
25+
26+ - name : Run Rust tests in Docker
27+ run : |
28+ docker run --rm metassr-test bash -c "
29+ cd /root
30+ cargo test --verbose
31+ "
Original file line number Diff line number Diff line change 11## TODO
22
33#### Main features
4- - [x] Serving staic files are located in `` ./static/** ``
4+ - [x] Serving static files are located in `` ./static/** ``
55
66- [x] the HTML builder
77
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ impl ManifestGenerator {
119119 }
120120 }
121121 pub fn generate < H : AsRef < OsStr > + ?Sized > ( & self , head : & H ) -> Result < Manifest > {
122- let cache_path = self . cache . path ( ) ;
122+ let cache_path = self . cache . path ( ) ;
123123 let global = GlobalEntry :: new ( head, cache_path) ?;
124124 let mut manifest = Manifest :: new ( global) ;
125125
Original file line number Diff line number Diff line change @@ -79,10 +79,7 @@ impl Build for ServerSideBuilder {
7979 } ;
8080
8181 let bundling_targets = targets. ready_for_bundling ( & self . dist_path ) ;
82- let bundler = WebBundler :: new (
83- & bundling_targets,
84- & self . dist_path ,
85- ) ?;
82+ let bundler = WebBundler :: new ( & bundling_targets, & self . dist_path ) ?;
8683
8784 if let Err ( e) = bundler. exec ( ) {
8885 return Err ( anyhow ! ( "Bundling failed: {e}" ) ) ;
Original file line number Diff line number Diff line change @@ -51,8 +51,7 @@ impl HeadRenderer {
5151 let bundling_targets = self . bundling_target ( ) ?;
5252 let bundler = WebBundler :: new ( & bundling_targets, self . cache_dir . path ( ) ) ?;
5353
54- if let Err ( e) = bundler. exec ( )
55- {
54+ if let Err ( e) = bundler. exec ( ) {
5655 return Err ( anyhow ! ( "Cannot bundling head: {e}" ) ) ;
5756 }
5857 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments