@@ -33,14 +33,20 @@ jobs:
3333 runs-on : ubuntu-latest
3434 steps :
3535 - uses : actions/checkout@v4
36+ - name : Setup Chrome
37+ uses : browser-actions/setup-chrome@v1
38+ with :
39+ chrome-version : ' latest'
40+ install-chromedriver : true
41+ install-dependencies : true
3642 - uses : dtolnay/rust-toolchain@stable
3743 with :
3844 components : clippy
3945 targets : wasm32-unknown-unknown
4046 # lint the main library workspace for non-wasm target
41- - run : cargo clippy --all- features -- -D warnings
47+ - run : cargo clippy --features all -- -D warnings -A deprecated
4248 # lint the non-wasm examples
43- - run : cd ${{ github.workspace }}/examples && cargo clippy --workspace --exclude "wasm*" -- -D warnings
49+ - run : cd ${{ github.workspace }}/examples && cargo clippy --workspace --exclude "wasm*" --exclude "kaleido" -- -D warnings
4450 # lint the plotly library for wasm target
4551 - run : cargo clippy --package plotly --target wasm32-unknown-unknown -- -D warnings
4652 # lint the wasm examples
@@ -68,12 +74,56 @@ jobs:
6874 os : [ubuntu-latest, windows-latest, macos-latest]
6975 runs-on : ${{ matrix.os }}
7076 steps :
77+ - name : Setup Chrome
78+ uses : browser-actions/setup-chrome@v1
79+ with :
80+ chrome-version : ' latest'
81+ install-chromedriver : true
82+ install-dependencies : true
7183 - uses : actions/checkout@v4
7284 - uses : dtolnay/rust-toolchain@stable
73- - run : cargo test --features plotly_ndarray,plotly_image,kaleido
85+ - run : cargo test --features plotly_ndarray,plotly_image,static_export_default
7486 - if : ${{ matrix.os == 'windows-latest' }}
7587 run : gci -recurse -filter "*example*"
7688
89+ test-static-export :
90+ name : Test Static Export
91+ strategy :
92+ fail-fast : false
93+ matrix :
94+ os : [ubuntu-latest, windows-latest, macos-latest]
95+ browser : [firefox, chrome]
96+ runs-on : ${{ matrix.os }}
97+ steps :
98+ - uses : actions/checkout@v4
99+
100+ - name : Setup Firefox
101+ if : matrix.browser == 'firefox'
102+ uses : browser-actions/setup-firefox@v1
103+ with :
104+ firefox-version : ' latest'
105+
106+ - name : Setup Chrome
107+ if : matrix.browser == 'chrome'
108+ uses : browser-actions/setup-chrome@v1
109+ with :
110+ chrome-version : ' latest'
111+ install-chromedriver : true
112+ install-dependencies : true
113+
114+ - uses : dtolnay/rust-toolchain@stable
115+
116+ - name : Test plotly and plotly_static
117+ shell : bash
118+ run : |
119+ if [ "${{ matrix.browser }}" = "firefox" ]; then
120+ cargo test --features static_export_default --lib
121+ cd plotly_static && cargo test --features geckodriver,webdriver_download
122+ else
123+ cargo test --features static_export_chromedriver,static_export_downloader --lib
124+ cd plotly_static && cargo test --features chromedriver,webdriver_download
125+ fi
126+
77127 code-coverage :
78128 name : Code Coverage
79129 runs-on : ubuntu-latest
@@ -103,12 +153,20 @@ jobs:
103153 ndarray,
104154 scientific_charts,
105155 shapes,
156+ static_export,
106157 subplots,
107158 themes,
108159 ]
109160 runs-on : ubuntu-latest
110161 steps :
111162 - uses : actions/checkout@v4
163+
164+ - name : Setup Firefox (for static_export)
165+ if : matrix.example == 'static_export'
166+ uses : browser-actions/setup-firefox@v1
167+ with :
168+ firefox-version : ' latest'
169+
112170 - uses : dtolnay/rust-toolchain@stable
113171 - run : cd ${{ github.workspace }}/examples/${{ matrix.example }} && cargo build
114172
@@ -131,6 +189,12 @@ jobs:
131189 runs-on : ubuntu-latest
132190 steps :
133191 - uses : actions/checkout@v4
192+
193+ - name : Setup Firefox (for static_export example)
194+ uses : browser-actions/setup-firefox@v1
195+ with :
196+ firefox-version : ' latest'
197+
134198 - uses : dtolnay/rust-toolchain@stable
135199 - run : cargo install mdbook --no-default-features --features search --vers "^0.4" --locked --quiet
136200 - name : Build examples to generate needed html files
@@ -143,5 +207,6 @@ jobs:
143207 cd ${{ github.workspace }}/examples/subplots && cargo run
144208 cd ${{ github.workspace }}/examples/shapes && cargo run
145209 cd ${{ github.workspace }}/examples/themes && cargo run
210+ cd ${{ github.workspace }}/examples/static_export && cargo run
146211 - name : Build book
147212 run : mdbook build docs/book
0 commit comments