Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CI to GitHub Actions #1474

Merged
merged 38 commits into from
Aug 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
053ed51
clippy in tests
siku2 Aug 6, 2020
0adeb64
add pull request workflow
siku2 Aug 6, 2020
a0a8b81
fix formatting
siku2 Aug 6, 2020
c80a220
add names to steps
siku2 Aug 6, 2020
bf81bc5
fix clippy
siku2 Aug 6, 2020
545ec73
update
siku2 Aug 6, 2020
7f7b641
avoid mutable
siku2 Aug 6, 2020
952501c
use wasm target
siku2 Aug 6, 2020
6d8cf72
install it too
siku2 Aug 6, 2020
da00b15
except there
siku2 Aug 6, 2020
b0f9e70
let's give chrome a spin
siku2 Aug 6, 2020
83a0d6d
clippy has some more to say
siku2 Aug 6, 2020
9cc8ed3
only run specific tests
siku2 Aug 6, 2020
b9bf359
fix tests on chrome
siku2 Aug 6, 2020
198aaa0
add cache
siku2 Aug 6, 2020
a517496
rename benchmark for consistency
siku2 Aug 6, 2020
c1af36f
re-enable geckodriver
siku2 Aug 6, 2020
363793c
clean up old files
siku2 Aug 6, 2020
30e6c56
remove all mentions of Travis
siku2 Aug 7, 2020
a0e8356
check all examples
siku2 Aug 7, 2020
5500a52
let's try with a bigger timeout
siku2 Aug 7, 2020
3d5d9a4
test both browsers at the same time
siku2 Aug 7, 2020
231782d
chrome really doesn't like me
siku2 Aug 7, 2020
023305a
finish up
siku2 Aug 7, 2020
58de4d0
run for pushes to master
siku2 Aug 7, 2020
0fb84cc
improve caching
siku2 Aug 7, 2020
4402a4c
fix order in workspace members
siku2 Aug 7, 2020
948308a
clippy use --all-targets
siku2 Aug 7, 2020
bf82556
rename workflow file
siku2 Aug 7, 2020
34edca0
Apply suggestions from code review
siku2 Aug 15, 2020
10c1229
use stable toolchain for lints
siku2 Aug 15, 2020
d36b606
run lints on nightly too
siku2 Aug 15, 2020
46676e6
add doctest for yew-stdweb
siku2 Aug 15, 2020
87517f0
allow failure for nightly clippy steps
siku2 Aug 15, 2020
4d3d5dc
let's try it on the job level again
siku2 Aug 15, 2020
5b4d84c
always run all lint steps
siku2 Aug 15, 2020
106b7ba
only run lints on stable toolchain
siku2 Aug 15, 2020
b5b9c0f
use 'no_run' instead of 'ignore'
siku2 Aug 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/autopublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: "12.x"
- name: Install dependencies
run: cd website && yarn install && cd ../
- name: Build site
Expand Down
File renamed without changes.
225 changes: 225 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
name: Pull Request

on:
pull_request:
push:
branches: [master]

jobs:
lint:
name: Format & Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt, clippy

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
yew-stdweb/target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-${{ runner.os }}-

- name: Run fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run clippy
if: always()
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings

- name: Run clippy - yew with all features
if: always()
run: |
cd yew
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings

- name: Run clippy - yew-stdweb with all features
if: always()
run: |
cd yew-stdweb
cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings

check_examples:
name: Check Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-${{ runner.os }}-

- name: Run check
run: |
cd examples
cargo check --all-targets

doc_tests:
name: Documentation Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
profile: minimal

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-${{ runner.os }}-

- name: Run doctest
uses: actions-rs/cargo@v1
with:
command: test
args: --doc

- name: Run doctest - yew with features
run: |
cd yew
cargo test --doc --features "doc_test wasm_test yaml msgpack cbor toml"

- name: Run doctest - yew-stdweb with features
run: |
# Sadly we can't run the tests on yew-stdweb as the snippets use `yew`, not `yew_stdweb` so the imports wouldn't work.
# To fix this we just run them on yew but with yew-stdweb's default features enabled.
cd yew
cargo test --doc \
--no-default-features --features "services agent std_web" \
--features "doc_test wasm_test yaml msgpack cbor toml"

integration_tests:
name: Integration Tests on ${{ matrix.toolchain }}
runs-on: ubuntu-latest
services:
httpbin:
image: kennethreitz/httpbin@sha256:599fe5e5073102dbb0ee3dbb65f049dab44fa9fc251f6835c9990f8fb196a72b
ports:
- 8080:80

strategy:
matrix:
toolchain:
- 1.45.0 # MSRV
- stable

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
override: true
profile: minimal

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
yew-stdweb/target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-${{ runner.os }}-

# FIXME: Only needed because of <https://github.com/rustwasm/wasm-bindgen/issues/2261>
- name: Install geckodriver
run: |
cd ~
mkdir geckodriver
curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
tar -xzf geckodriver-*-linux64.tar.gz -C geckodriver
echo "::add-path::$HOME/geckodriver"

- name: Run tests - yew
env:
HTTPBIN_URL: "http://localhost:8080"
run: |
cd yew
wasm-pack test --chrome --firefox --headless -- --features "wasm_test httpbin_test"

- name: Run tests - yew-stdweb
env:
HTTPBIN_URL: "http://localhost:8080"
run: |
cd yew-stdweb
# FIXME: Chrome really doesn't seem to like yew-stdweb
wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test"

- name: Run tests - yew-functional
run: |
cd yew-functional
wasm-pack test --chrome --firefox --headless

unit_tests:
name: Unit Tests on ${{ matrix.toolchain }}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- 1.45.0 # MSRV
- stable
- nightly

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
cargo-${{ runner.os }}-

- name: Run tests
run: |
packages=("yew-components" "yew-functional" "yew-macro" "yew-router" "yew-router-macro" "yew-router-route-parser" "yewtil")
for package in "${packages[@]}"; do
(cd "$package" && cargo test)
done
4 changes: 2 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ pull_request_rules:
- name: automatic merge on CI success - admin
conditions:
- author=@yewstack/maintainers
- status-success=Travis CI - Pull Request
- status-success~=Pull Request
- label=automerge
actions:
merge:
method: squash
- name: remove automerge label on CI failure
conditions:
- status-failure=Travis CI - Pull Request
- status-failure~=Pull Request
- label=automerge
actions:
label:
Expand Down
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ members = [
"examples/js_callback",
"examples/keyed_list",
"examples/large_table",
"examples/minimal_wp",
"examples/minimal",
"examples/minimal_wp",
"examples/mount_point",
"examples/multi_thread",
"examples/nested_list",
Expand Down
23 changes: 0 additions & 23 deletions ci/clear_cache.sh

This file was deleted.

15 changes: 0 additions & 15 deletions ci/install_cargo_web.sh

This file was deleted.

7 changes: 1 addition & 6 deletions yew-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
name = "yew-components"
version = "0.2.0"
edition = "2018"
authors = [
"Yew Maintainers <[email protected]>",
]
authors = ["Yew Maintainers <[email protected]>"]
repository = "https://github.com/yewstack/yew"
homepage = "https://github.com/yewstack/yew"
documentation = "https://docs.rs/yew-components/"
Expand All @@ -13,9 +11,6 @@ keywords = ["web", "asmjs", "webasm", "javascript"]
categories = ["gui", "web-programming"]
description = "A collection of community-created Yew components"

[badges]
travis-ci = { repository = "yewstack/yew" }

[dependencies]
wasm-bindgen = "0.2.60"
web-sys = "0.3"
Expand Down
4 changes: 0 additions & 4 deletions yew-functional/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ keywords = ["web", "wasm", "frontend", "webasm", "webassembly"]
categories = ["gui", "web-programming", "wasm"]
description = "A framework for making client-side single-page apps"


[badges]
travis-ci = { repository = "yewstack/yew" }

[dev-dependencies]
wasm-bindgen-test = "0.3.9"
web-sys = "0.3.36"
Expand Down
3 changes: 0 additions & 3 deletions yew-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ keywords = ["web", "wasm", "frontend", "webasm", "webassembly"]
categories = ["gui", "web-programming", "wasm"]
description = "A framework for making client-side single-page apps"

[badges]
travis-ci = { repository = "yewstack/yew" }

[lib]
proc-macro = true

Expand Down
Loading