parent
8c2360e963
commit
0ec86a94fb
@ -0,0 +1,34 @@
|
||||
name: "test_and_badge"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test_and_badge:
|
||||
name: "Test and Badge"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Prepare"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl git
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source $HOME/.cargo/env
|
||||
rustup toolchain install nightly
|
||||
git clone https://github.com/deinstapel/cursive-async-view.git repo
|
||||
|
||||
- name: "Build and Test"
|
||||
run: |
|
||||
cd repo
|
||||
RUST_CHAIN=stable ./scripts/ci-build.sh
|
||||
RUST_CHAIN=nightly ./scripts/ci-build.sh
|
||||
|
||||
- name: "Deploy Badge"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
cd repo
|
||||
./scripts/deploy-badges.sh
|
@ -1,12 +0,0 @@
|
||||
language: rust
|
||||
rust:
|
||||
- stable
|
||||
- nightly
|
||||
script:
|
||||
- RUST_CHAIN=$TRAVIS_RUST_VERSION ./scripts/ci-build.sh
|
||||
# do not use deploy here as deploy scripts are not executed for failed builds
|
||||
after_script:
|
||||
- >
|
||||
test "$TRAVIS_PULL_REQUEST" = false &&
|
||||
test "$TRAVIS_BRANCH" = master &&
|
||||
GITHUB_REPO_SLUG="$TRAVIS_REPO_SLUG" ./scripts/deploy-badges.sh
|
Loading…
Reference in new issue