Skip to content

Commit

Permalink
Merge pull request rancher#5132 from nwmac/move-drone-test-lint-to-gh…
Browse files Browse the repository at this point in the history
…-action

Move test and lints to GitHub actions
  • Loading branch information
richard-cox authored Apr 15, 2024
2 parents a5d43f7 + df9adf0 commit b649966
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
16 changes: 0 additions & 16 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b649966

Please sign in to comment.