Remove travis & Update README

pull/10/head
Johannes Wünsche 2 years ago
parent 8c2360e963
commit 0ec86a94fb
Signed by: johannes
GPG Key ID: 2511CF80B7C283AB

@ -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

@ -1,9 +1,9 @@
<h1 align="center">Welcome to cursive-async-view 👋</h1>
<p align="center">
<a href="https://travis-ci.org/deinstapel/cursive-async-view">
<a href="https://github.com/deinstapel/cursive-async-view/actions">
<img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fstable-build.json" alt="stable build">
</a>
<a href="https://travis-ci.org/deinstapel/cursive-async-view">
<a href="https://github.com/deinstapel/cursive-async-view/actions">
<img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fnightly-build.json" alt="nightly build">
</a>
<a href="https://crates.io/crates/cursive-async-view">
@ -142,7 +142,7 @@ The changelog is located in a [separate file](./CHANGELOG.md) and contains chang
If you find any bugs/unexpected behaviour or you have a proposition for future changes open an issue describing the current behaviour and what you expected.
## Development [![cargo test](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fcargo-test.json)](https://travis-ci.org/deinstapel/cursive-async-view)
## Development [![cargo test](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fcargo-test.json)](https://github.com/deinstapel/cursive-async-view/actions)
> TBD

@ -5,9 +5,9 @@ die() {
exit 1
}
if [ -z "$GITHUB_USERNAME" ]
if [ -z "$GITHUB_ACTOR" ]
then
die "the GITHUB_USERNAME environment variable is not set"
die "the GITHUB_ACTOR environment variable is not set"
fi
if [ -z "$GITHUB_TOKEN" ]
@ -15,16 +15,18 @@ then
die "the GITHUB_TOKEN environment variable is not set"
fi
if [ -z "$GITHUB_REPO_SLUG" ]
if [ -z "$GITHUB_REPOSITORY" ]
then
die "the GITHUB_REPO_SLUG environment variable is not set"
die "the GITHUB_REPOSITORY environment variable is not set"
fi
(
cd "$(git rev-parse --show-toplevel)/target/shields" || die "cannot find project root!"
repo="https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git"
repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
tmp_dir=$(mktemp -d -t cursive-multiplex-deploy-XXXXXXXX)
git config --global user.email "runner@ci"
git config --global user.name "Github CI Runner"
try=0
while :; do
if ! git clone --branch gh-pages "$repo" "$tmp_dir"
@ -42,7 +44,7 @@ fi
(
cd "$tmp_dir" || die "failed to enter temporary directory"
git add -A
git commit -m "Travis CI badge deployment"
git commit -m "Github CI badge deployment"
git push origin gh-pages:gh-pages
)

Loading…
Cancel
Save