Skip to content

Commit

Permalink
feat: move upstream tests from travisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
exdx committed Dec 9, 2020
1 parent 2e9bb75 commit c5ea4ec
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 92 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/unit.yaml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/upstreams-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: upstream-tests
on:
push:
branches:
- '**'
pull_request:
paths:
- '**'
- '!doc/**'
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: make build
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: make unit
- run: sed -i'' "s:^github.com/$GITHUB_REPOSITORY/::" coverage.out
- uses: codecov/codecov-action@v1
with:
file: coverage.out
fail_ci_if_error: false
run-e2e-minikube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
sudo apt-get install conntrack
curl -sLo minikube "$(curl -sL https://api.github.com/repos/kubernetes/minikube/releases/latest | jq -r '[.assets[] | select(.name == "minikube-linux-amd64")] | first | .browser_download_url')"
chmod +x minikube
sudo mv minikube /bin/
minikube config set vm-driver none
sudo minikube start
sudo chown -R "$USER" "$HOME/.kube" "$HOME/.minikube"
KUBECONFIG="$HOME/.kube/config" make e2e
run-e2e-kind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
curl -sLo kind "$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '[.assets[] | select(.name == "kind-linux-amd64")] | first | .browser_download_url')"
chmod +x kind
sudo mv kind /bin/
kind create cluster
kind export kubeconfig
sudo chown -R "$USER" "$HOME/.kube"
KUBECONFIG="$HOME/.kube/config" make e2e
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

21 changes: 3 additions & 18 deletions docs/contributors/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## opm

Releases of opm are built by travis, see the [travis.yml](../../.travis.yml) for details.
Releases of opm are built by Github Actions, see the [release.yml](../../.github/workflows/release.yml) for details.
amd64 builds are produced for linux, macos, and windows.

opm follows semantic versioning, with the latest version derived from the newest semver tag.

Expand All @@ -12,7 +13,7 @@ Releases are triggered via tags. Make a new release by tagging a commit with an

## Checking the build

Builds for a release can be found [on travis](https://travis-ci.com/operator-framework/operator-registry). After triggering a build, watch for logs. If the build is successful, a new [release](https://github.com/operator-framework/operator-registry) should appear in GitHub.
Builds for a release can be found [on GitHub Actions](https://github.com/operator-framework/operator-registry/actions). After triggering a build, watch for logs. If the build is successful, a new [release](https://github.com/operator-framework/operator-registry/releases) should appear in GitHub.

## Docker images

Expand All @@ -24,19 +25,3 @@ Builds are also triggered for the following docker images. The tags in Quay.io w

Images are also built to track master with `latest` tags. It is recommended that you always pull by digest, and only use images that are tagged with a version.


## Generating Travis API keys

This requires the travis CLI tool to be installed.

First, backup the existing deploy config in `.travis.yml` - the prompts will overwrite some of the config, and
we only need the generated api token. This can be done by renaming the `deploy` yaml key to something else.

```sh
$ travis setup releases -r operator-framework/operator-registry --force --pro
```

When prompted, enter credentials for the of-deploy-robot account. Copy the api key from the newly generated `deploy` section in .travis.yml, place
it in the right place in the actual deploy config, and delete the generated deploy section.

You mean need to `travis login --pro` first.

0 comments on commit c5ea4ec

Please sign in to comment.