Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

chore: Clean up CI scripts #230

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,70 @@
name: build
on: [push]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
with:
# Fetch depth 0 is needed for 'git describe --tag'
fetch-depth: 0

- name: Build
run: make -j build/linux build/windows

- name: Upload
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: coder-cli
path: ./ci/bin/coder-cli-*
build_darwin:

build_darwin_pull:
runs-on: macos-latest
if: github.ref != 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build
run: unset CI && make build/macos

build_darwin_master:
runs-on: macos-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Gon
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon

- name: Import Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Build

- name: Build master
run: make build/macos
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}

- name: Upload
uses: actions/upload-artifact@v2
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: integration
on:
push:
branches:
- master
schedule:
- cron: '*/180 * * * *'

Expand All @@ -12,15 +14,15 @@ jobs:
CODER_EMAIL: ${{ secrets.CODER_EMAIL }}
CODER_PASSWORD: ${{ secrets.CODER_PASSWORD }}
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: '^1.14'
go-version: '^1.15'
- name: integration tests
run: ./ci/scripts/integration.sh
22 changes: 14 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: test
on: [push]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -25,12 +31,12 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
version: v1.36
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -43,8 +49,8 @@ jobs:
gendocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down