Skip to content

Run tests on drone.io #247

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

Merged
merged 2 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
kind: pipeline
name: default

steps:
- name: lint
image: arduino/arduino-cli:drone-0.2.0
commands:
# Check if the Go code is properly formatted and run the linter
- task check
# Ensure protobufs compile
- task protoc

- name: build
image: arduino/arduino-cli:drone-0.2.0
commands:
- task build

- name: test
image: arduino/arduino-cli:drone-0.2.0
commands:
- task test
- task test-legacy

# Contrary to other CI platforms, uploading reports to Codecov requires Drone to provide a token.
# To avoid exposing the Codecov token to external PRs, we only upload coverage when we merge on
# `master`.
- name: coverage
image: arduino/arduino-cli:drone-0.2.0
environment:
CODECOV_TOKEN:
from_secret: codecov_token
commands:
- codecov -cF unit -f coverage_unit.txt -t $CODECOV_TOKEN
- codecov -cF integ -f coverage_integ.txt -t $CODECOV_TOKEN
when:
branch:
- master
event:
- push
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

24 changes: 24 additions & 0 deletions Dockerfiles/CI/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.12

RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
unzip \
&& rm -rf /var/lib/apt/lists/*

ENV PROTOBUF_VER 3.8.0

# NOTE: most of the following assume WORDKIR is '/'
RUN set -ex \
# Task executor, will be installed in /bin
&& curl -sL https://taskfile.dev/install.sh | sh \
# Codecov uploader
&& curl -o /bin/codecov -LO https://codecov.io/bash && chmod +x /bin/codecov \
# Go runtime dependencies
&& go get github.com/golangci/govet \
&& go get golang.org/x/lint/golint \
# Protobuf tooling
&& go get github.com/golang/protobuf/protoc-gen-go \
&& mkdir protobuf && cd protobuf \
&& curl -LO https://github.com/google/protobuf/releases/download/v$PROTOBUF_VER/protoc-$PROTOBUF_VER-linux-x86_64.zip \
&& unzip protoc-$PROTOBUF_VER-linux-x86_64.zip && cp ./bin/* /bin/ \
&& cd .. && rm -rf protobuf
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/arduino/arduino-cli.svg?branch=master)](https://travis-ci.org/arduino/arduino-cli)

# arduino-cli

[![Build Status](https://cloud.drone.io/api/badges/arduino/arduino-cli/status.svg)](https://cloud.drone.io/arduino/arduino-cli)

`arduino-cli` is an all-in-one solution that provides builder, boards/library manager, uploader, discovery and many other tools needed to use any Arduino compatible board and platforms.

This software is currently in alpha state: new features will be added and some may be changed.
Expand Down Expand Up @@ -355,4 +355,4 @@ Currently Unit and Integration test are available for launch in 2 ways:
* test-unit-race: Run unit tests only with race condition detection
```

For Example to launch unit tests only run: `task test-unit`
For Example to launch unit tests only run: `task test-unit`