@@ -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,55 @@ 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+ run : |
118+ if [ "${{ matrix.browser }}" = "firefox" ]; then
119+ cargo test --features static_export_default --lib
120+ cd plotly_static && cargo test --features geckodriver,webdriver_download
121+ else
122+ cargo test --features static_export_chromedriver,static_export_downloader --lib
123+ cd plotly_static && cargo test --features chromedriver,webdriver_download
124+ fi
125+
77126 code-coverage :
78127 name : Code Coverage
79128 runs-on : ubuntu-latest
@@ -103,12 +152,20 @@ jobs:
103152 ndarray,
104153 scientific_charts,
105154 shapes,
155+ static_export,
106156 subplots,
107157 themes,
108158 ]
109159 runs-on : ubuntu-latest
110160 steps :
111161 - uses : actions/checkout@v4
162+
163+ - name : Setup Firefox (for static_export)
164+ if : matrix.example == 'static_export'
165+ uses : browser-actions/setup-firefox@v1
166+ with :
167+ firefox-version : ' latest'
168+
112169 - uses : dtolnay/rust-toolchain@stable
113170 - run : cd ${{ github.workspace }}/examples/${{ matrix.example }} && cargo build
114171
@@ -131,6 +188,12 @@ jobs:
131188 runs-on : ubuntu-latest
132189 steps :
133190 - uses : actions/checkout@v4
191+
192+ - name : Setup Firefox (for static_export example)
193+ uses : browser-actions/setup-firefox@v1
194+ with :
195+ firefox-version : ' latest'
196+
134197 - uses : dtolnay/rust-toolchain@stable
135198 - run : cargo install mdbook --no-default-features --features search --vers "^0.4" --locked --quiet
136199 - name : Build examples to generate needed html files
@@ -143,5 +206,6 @@ jobs:
143206 cd ${{ github.workspace }}/examples/subplots && cargo run
144207 cd ${{ github.workspace }}/examples/shapes && cargo run
145208 cd ${{ github.workspace }}/examples/themes && cargo run
209+ cd ${{ github.workspace }}/examples/static_export && cargo run
146210 - name : Build book
147211 run : mdbook build docs/book
0 commit comments