Skip to content

Commit

Permalink
ci(circle-ci): Fix CircleCI config for new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elldritch committed Feb 15, 2018
1 parent b7dff83 commit 455abd0
Showing 1 changed file with 4 additions and 36 deletions.
40 changes: 4 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,32 @@ version: 2
jobs:
build:
docker:
- image: circleci/golang:1.9

working_directory: /go/src/github.com/fossas/fossa-cli

- image: quay.io/fossa/fossa-cli:latest
working_directory: /home/fossa/go/src/github.com/fossas/fossa-cli
environment:
TEST_RESULTS: /tmp/test-results

steps:
- checkout
- run: mkdir -p $TEST_RESULTS

- restore_cache:
keys:
- gopkg-cache-{{ checksum "Gopkg.lock" }}

- run:
name: Install `dep`
command: |
sudo curl -L -o /usr/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
sudo chmod +x /usr/bin/dep
- run:
name: Compile CLI
command: |
# Invalidate pkg cache for FOSSA CLI binary
rm -rf pkg/linux_amd64/github.com/fossas/fossa-cli
dep ensure
make
- run:
name: Install `node`
command: |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
- run:
name: Install `yarn`
command: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
- run:
name: Run integration test
command: |
mkdir -p /tmp/integration-test
cd /tmp/integration-test
git clone https://github.com/fossas/cli-acceptance-monolith.git
cd cli-acceptance-monolith
git submodule init
git submodule update --recursive
yarn
yarn run mocha --reporter=mocha-junit-reporter --reporter-options mochaFile=$TEST_RESULTS/mocha/test-results.xml --timeout=30000
go test ./build
- save_cache:
key: gopkg-cache-{{ checksum "Gopkg.lock" }}
paths:
- "/go/pkg"
- "/home/fossa/go/pkg"

- store_test_results:
path: /tmp/test-results

0 comments on commit 455abd0

Please sign in to comment.