diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6bd8252..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: 2 -jobs: - build: - machine: - image: ubuntu-1604:201903-01 - steps: - - checkout - - run: - name: prepare machine - command: | - sudo -E .circleci/machinesetup.sh - - run: - name: compile driver - command: | - ./build.sh - - store_artifacts: - path: nomad-driver-podman - destination: nomad-driver-podman - - run: - name: test - command: | - sudo -E build/bin/gotestsum --junitfile build/test/result.xml -- -timeout=15m . - - store_test_results: - path: build/test/ diff --git a/.circleci/machinesetup.sh b/.github/machinesetup.sh similarity index 84% rename from .circleci/machinesetup.sh rename to .github/machinesetup.sh index e9f3b9c..391f949 100755 --- a/.circleci/machinesetup.sh +++ b/.github/machinesetup.sh @@ -49,14 +49,3 @@ EOF systemctl daemon-reload systemctl start io.podman - -# remove default circleci go -cd /usr/local -rm -rf go - -# setup go 1.12.x, instead -wget -O- https://storage.googleapis.com/golang/go1.12.13.linux-amd64.tar.gz| tar xfz - -ln -s /usr/local/go/bin/go /usr/bin/go - -echo "====== Installed go:" -go version \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fd84769 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: build + +on: [push] + +jobs: + build: + + runs-on: ubuntu-16.04 + + steps: + - uses: actions/checkout@v1 + + - name: Prepare machine + run: sudo bash -e .github/machinesetup.sh + + - name: Compile driver + run: ./build.sh + - name: Archive production artifacts + uses: actions/upload-artifact@v1 + with: + name: nomad-driver-podman + path: nomad-driver-podman + + - name: Test + run: sudo -E GOPATH=$PWD/build build/bin/gotestsum --junitfile build/test/result.xml -- -timeout=15m . + - name: Archive test result + uses: actions/upload-artifact@v1 + with: + name: test-result + path: build/test/result.xml diff --git a/README.md b/README.md index 4e8486f..dda83f0 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ Nomad podman Driver [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/pascomnet/nomad-driver-podman/blob/master/LICENSE) -[![CircleCI](https://circleci.com/gh/pascomnet/nomad-driver-podman.svg?style=shield)](https://circleci.com/gh/pascomnet/nomad-driver-podman) - +![](https://github.com/pascomnet/nomad-driver-podman/workflows/build/badge.svg) *THIS IS A PROOF OF CONCEPT PLUGIN*. Do not run it in production! Contributions are welcome, of course.