-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from anp/publish-prep
Publish prep
- Loading branch information
Showing
22 changed files
with
1,128 additions
and
961 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
version: 1 | ||
update_configs: | ||
- package_manager: "rust:cargo" | ||
update_schedule: "live" | ||
version: 1 | ||
update_configs: | ||
- package_manager: "rust:cargo" | ||
update_schedule: "live" | ||
directory: "/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,96 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
main: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
# WALL'O'CACHE! | ||
- name: cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo-registry- | ||
- name: cache cargo index | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo-index- | ||
- run: rustup update | ||
|
||
# tests | ||
- run: cargo test-core | ||
- run: cargo test-augdom | ||
- run: cargo test-dom-lib | ||
- run: cargo test-dom-lib-browser | ||
- run: cargo test-dom-hacking | ||
- run: cargo test-dom-todo | ||
- run: cargo test-ssr-example | ||
- run: cargo test-dom-drivertest | ||
|
||
# examples, docs, website | ||
- run: cargo build-dom-hacking | ||
- run: cargo build-dom-todo | ||
- run: cargo docs-all | ||
- run: cargo docs-ofl | ||
- run: cargo build-website | ||
|
||
- name: promote website to prod, ensure crates published | ||
if: github.ref == 'refs/heads/master' && runner.os == 'Linux' | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
run: | | ||
npx netlify-cli deploy --prod | ||
cargo login ${{ secrets.CARGO_API_TOKEN }} | ||
cargo ofl published | ||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: rustup update | ||
- run: rustup component add clippy | ||
- run: cargo clippy-core | ||
- run: cargo clippy-dom | ||
- run: cargo clippy-ofl | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: cargo fmt-project --check | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
main: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/cache@v2 | ||
with: | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo- | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
ofl/target | ||
- run: rustup update | ||
|
||
# build all crates, collect timings | ||
- run: cargo build-times | ||
working-directory: ofl | ||
- run: cargo build-times | ||
- name: archive build timings | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-times | ||
path: "**/cargo-timing.html" | ||
|
||
# tests with coverage | ||
- run: cargo ofl coverage collect test-core | ||
- run: cargo ofl coverage collect test-dom | ||
- run: cargo ofl coverage report | ||
- name: archive coverage | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: target/coverage/html | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./target/coverage/lcov.info | ||
fail_ci_if_error: true | ||
|
||
# browser tests -- no coverage | ||
- run: cargo test-augdom | ||
- run: cargo test-dom-lib-browser | ||
- run: cargo test-dom-hacking | ||
- run: cargo test-dom-todo | ||
- run: cargo test-dom-drivertest | ||
|
||
# examples, docs, website | ||
- run: cargo docs-all | ||
- run: cargo docs-ofl | ||
- run: cargo build-website | ||
|
||
- name: assert the git repo hasn't changed | ||
if: runner.os == 'Linux' | ||
run: output=$(git status --porcelain) && [ -z "$output" ] | ||
- name: archive website | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: website | ||
path: target/website | ||
- name: promote website to prod, ensure crates published | ||
if: github.ref == 'refs/heads/master' && runner.os == 'Linux' | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
run: | | ||
npx netlify-cli deploy --prod | ||
cargo login ${{ secrets.CARGO_API_TOKEN }} | ||
cargo ofl published | ||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: rustup update | ||
- run: rustup component add clippy | ||
- run: cargo clippy-core | ||
- run: cargo clippy-dom | ||
- run: cargo clippy-ofl | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: cargo fmt-project --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ target/ | |
**/*.rs.bk | ||
/Cargo.lock | ||
*.log | ||
.vscode/ | ||
node_modules/ | ||
.idea/ | ||
pkg/ | ||
pkg/ | ||
cargo-timing*.html |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.