2020-05-07 11:06:55 +07:00
|
|
|
name: ci
|
|
|
|
|
2020-05-19 09:43:31 +07:00
|
|
|
on: [push]
|
2020-05-07 11:06:55 +07:00
|
|
|
|
|
|
|
jobs:
|
2020-05-13 06:33:34 +07:00
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run ./ci/steps/fmt.sh
|
2020-09-15 21:41:47 +07:00
|
|
|
uses: ./ci/images/debian10
|
2020-05-13 06:33:34 +07:00
|
|
|
with:
|
|
|
|
args: ./ci/steps/fmt.sh
|
|
|
|
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run ./ci/steps/lint.sh
|
2020-09-15 21:41:47 +07:00
|
|
|
uses: ./ci/images/debian10
|
2020-05-13 06:33:34 +07:00
|
|
|
with:
|
|
|
|
args: ./ci/steps/lint.sh
|
|
|
|
|
2020-05-08 07:44:32 +07:00
|
|
|
test:
|
2021-01-28 06:04:37 +07:00
|
|
|
needs: linux-amd64
|
2020-05-08 07:44:32 +07:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-07 11:06:55 +07:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2021-01-28 06:04:37 +07:00
|
|
|
- name: Download release packages
|
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 07:44:32 +07:00
|
|
|
with:
|
2021-01-28 06:04:37 +07:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
|
|
|
- name: Untar code-server file
|
|
|
|
run: |
|
|
|
|
cd release-packages && tar -xzf code-server*-linux-amd64.tar.gz
|
|
|
|
- uses: microsoft/playwright-github-action@v1
|
|
|
|
- name: Install dependencies and run tests
|
|
|
|
run: |
|
|
|
|
node ./release-packages/code-server*-linux-amd64 &
|
|
|
|
yarn --frozen-lockfile
|
|
|
|
yarn test
|
2020-05-08 07:44:32 +07:00
|
|
|
|
2020-05-08 10:48:49 +07:00
|
|
|
release:
|
2020-05-08 07:44:32 +07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run ./ci/steps/release.sh
|
2020-09-15 21:41:47 +07:00
|
|
|
uses: ./ci/images/debian10
|
2020-05-08 07:44:32 +07:00
|
|
|
with:
|
|
|
|
args: ./ci/steps/release.sh
|
|
|
|
- name: Upload npm package artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-19 00:48:45 +07:00
|
|
|
path: ./release-npm-package
|
2020-05-08 07:44:32 +07:00
|
|
|
|
2020-05-08 10:48:49 +07:00
|
|
|
linux-amd64:
|
|
|
|
needs: release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Download npm package
|
2020-05-08 11:34:20 +07:00
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 10:48:49 +07:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-19 00:48:45 +07:00
|
|
|
path: ./release-npm-package
|
2020-05-28 05:04:36 +07:00
|
|
|
- name: Run ./ci/steps/release-packages.sh
|
2020-06-03 23:14:55 +07:00
|
|
|
uses: ./ci/images/centos7
|
2020-05-08 10:48:49 +07:00
|
|
|
with:
|
2020-05-28 05:04:36 +07:00
|
|
|
args: ./ci/steps/release-packages.sh
|
2020-05-08 10:48:49 +07:00
|
|
|
- name: Upload release artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-05-08 11:34:20 +07:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
2020-05-08 10:48:49 +07:00
|
|
|
|
2020-05-08 07:44:32 +07:00
|
|
|
linux-arm64:
|
2020-05-08 10:48:49 +07:00
|
|
|
needs: release
|
2020-05-08 07:44:32 +07:00
|
|
|
runs-on: ubuntu-arm64-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-05-08 10:48:49 +07:00
|
|
|
- name: Download npm package
|
2020-05-08 11:34:20 +07:00
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 10:48:49 +07:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-19 00:48:45 +07:00
|
|
|
path: ./release-npm-package
|
2020-05-28 05:04:36 +07:00
|
|
|
- name: Run ./ci/steps/release-packages.sh
|
2020-06-03 23:14:55 +07:00
|
|
|
uses: ./ci/images/centos7
|
2020-05-08 07:44:32 +07:00
|
|
|
with:
|
2020-05-28 05:04:36 +07:00
|
|
|
args: ./ci/steps/release-packages.sh
|
2020-05-08 07:44:32 +07:00
|
|
|
- name: Upload release artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-05-08 11:34:20 +07:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
2020-05-08 07:44:32 +07:00
|
|
|
|
2020-05-08 12:42:46 +07:00
|
|
|
macos-amd64:
|
2020-05-08 10:48:49 +07:00
|
|
|
needs: release
|
2020-05-08 07:44:32 +07:00
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-05-08 10:48:49 +07:00
|
|
|
- name: Download npm package
|
2020-05-08 11:34:20 +07:00
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 10:48:49 +07:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-19 00:48:45 +07:00
|
|
|
path: ./release-npm-package
|
2020-05-28 05:04:36 +07:00
|
|
|
- run: ./ci/steps/release-packages.sh
|
2020-05-08 07:44:32 +07:00
|
|
|
env:
|
2020-05-08 10:48:49 +07:00
|
|
|
# Otherwise we get rate limited when fetching the ripgrep binary.
|
2020-05-09 03:31:42 +07:00
|
|
|
# For whatever reason only MacOS needs it.
|
2020-05-08 14:08:30 +07:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-08 07:44:32 +07:00
|
|
|
- name: Upload release artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
2020-05-07 11:06:55 +07:00
|
|
|
with:
|
2020-05-08 11:34:20 +07:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
2020-05-16 21:55:46 +07:00
|
|
|
|
|
|
|
docker-amd64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: linux-amd64
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Download release package
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
|
|
|
- name: Run ./ci/steps/build-docker-image.sh
|
2020-09-15 21:41:47 +07:00
|
|
|
uses: ./ci/images/debian10
|
2020-05-16 21:55:46 +07:00
|
|
|
with:
|
|
|
|
args: ./ci/steps/build-docker-image.sh
|
|
|
|
- name: Upload release image
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release-images
|
|
|
|
path: ./release-images
|
|
|
|
|
|
|
|
docker-arm64:
|
|
|
|
runs-on: ubuntu-arm64-latest
|
|
|
|
needs: linux-arm64
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Download release package
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
|
|
|
- name: Run ./ci/steps/build-docker-image.sh
|
2020-06-04 03:22:59 +07:00
|
|
|
uses: ./ci/images/centos7
|
2020-05-16 21:55:46 +07:00
|
|
|
with:
|
|
|
|
args: ./ci/steps/build-docker-image.sh
|
|
|
|
- name: Upload release image
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: release-images
|
|
|
|
path: ./release-images
|