diff --git a/.drone.yml b/.drone.yml index d9d91dc1ba..c8324cc531 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,22 +6,6 @@ platform: os: linux arch: amd64 -steps: -- name: test - pull: default - image: rancher/dapper:v0.6.0 - commands: - - dapper ci - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - exclude: - - tag - - name: build pull: default image: rancher/dapper:v0.6.0 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000000..a1d3bd5589 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,50 @@ +name: Tests +on: + push: + branches: + - master + - 'release-*' + pull_request: + branches: + - master + - 'release-*' + +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - uses: actions/setup-node@v3 + with: + node-version: '14.x' + + - name: Install Python for node-sass + run: | + DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 + + - name: Install packages + run: ./scripts/bootstrap + + - name: Run tests + run: yarn test + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - uses: actions/setup-node@v3 + with: + node-version: '14.x' + + - name: Install Python for node-sass + run: | + DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 + + - name: Install packages + run: ./scripts/bootstrap + + - name: Run linter + run: yarn lint:js diff --git a/scripts/bootstrap b/scripts/bootstrap index 024f3ba91f..16bb123239 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -9,7 +9,7 @@ else cd `dirname $CWD` fi -yarn --pure-lockfile install +yarn --pure-lockfile --non-interactive install git submodule init git submodule update git status