- Notifications
You must be signed in to change notification settings - Fork907
chore: Initial GHA workflow#1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
13 commits Select commitHold shift + click to select a range
c772e89
chore: Initial GHA workflow
bryphe-coder12a710e
Rename master -> main
bryphe-coder60ce29d
Remove script for now, since not needed for prettier check
bryphe-coderf594bbb
Run on ubuntu-latest instead of self-hosted runners
bryphe-coder2f1ff57
Add placeholders for test/go and test/js
bryphe-coderfe5a94d
Fix version check
bryphe-coder8e952e0
Fix formatting
bryphe-coderd65ffbe
Just run front-end tests on single OS, for now
bryphe-coder4ac14f1
Remove AUTHOR field from package.json, since we don't use this in cod…
bryphe-coder6725103
Add status badge
bryphe-coderbe4e349
Setup codecov; add badge
bryphe-coder6f0a43e
Minimize ignore files
bryphe-coderdb32104
Remove version & entry point
bryphe-coderFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions.eslintignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
############################################################################### | ||
# COPY PASTA OF .gitignore | ||
############################################################################### | ||
node_modules |
100 changes: 100 additions & 0 deletions.github/workflows/coder.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: coder | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- "release/*" | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- main | ||
- "release/*" | ||
workflow_dispatch: | ||
permissions: | ||
actions: none | ||
checks: none | ||
contents: read | ||
deployments: none | ||
issues: none | ||
packages: none | ||
pull-requests: none | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
jobs: | ||
style: | ||
name: "style/${{ matrix.style }}" | ||
runs-on: ubuntu-latest | ||
bryphe-coder marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
strategy: | ||
matrix: | ||
style: | ||
- fmt | ||
fail-fast: false | ||
permissions: | ||
actions: write # for cancel-workflow-action | ||
contents: read | ||
steps: | ||
- name: Cancel previous runs | ||
if: github.event_name == 'pull_request' | ||
uses: styfle/cancel-workflow-action@0.9.1 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Cache Node | ||
id: cache-node | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
**/node_modules | ||
.eslintcache | ||
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install node_modules | ||
run: yarn install | ||
- name: "make ${{ matrix.style }}" | ||
run: "make --output-sync -j ${{ matrix.style }}" | ||
test-go: | ||
name: "test/go" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "^1.17" | ||
# Check that go is available | ||
# TODO: Implement actual test run | ||
- run: go version | ||
test-js: | ||
name: "test/js" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14" | ||
# Check that node is available | ||
# TODO: Implement actual test run | ||
- run: node --version |
13 changes: 13 additions & 0 deletions.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
############################################################################### | ||
# NOTICE # | ||
# If you change this file, kindly copy-pasta your change into .prettierignore # | ||
# and .eslintignore as well. See the following discussions to understand why # | ||
# we have to resort to this duplication (at least for now): # | ||
# # | ||
# https://github.com/prettier/prettier/issues/8048 # | ||
# https://github.com/prettier/prettier/issues/8506 # | ||
# https://github.com/prettier/prettier/issues/8679 # | ||
############################################################################### | ||
node_modules | ||
.eslintcache |
7 changes: 7 additions & 0 deletions.prettierignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
############################################################################### | ||
# COPY PASTA OF .gitignore | ||
# https://github.com/prettier/prettier/issues/8048 | ||
# https://github.com/prettier/prettier/issues/8506 | ||
# https://github.com/prettier/prettier/issues/8679 | ||
############################################################################### | ||
node_modules |
12 changes: 12 additions & 0 deletionsMakefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
fmt/prettier: | ||
@echo "--- prettier" | ||
# Avoid writing files in CI to reduce file write activity | ||
ifdef CI | ||
yarn run format:check | ||
else | ||
yarn run format:write | ||
endif | ||
.PHONY: fmt/prettier | ||
fmt: fmt/prettier | ||
bryphe-coder marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
.PHONY: fmt |
6 changes: 5 additions & 1 deletionREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
[](https://github.com/coder/coder/actions/workflows/coder.yaml) | ||
[](https://codecov.io/gh/coder/coder) | ||
# Coder v2 | ||
This repository contains source code for Coder V2. Additional documentation: | ||
- [Workspaces V2 RFC](https://www.notion.so/coderhq/b48040da8bfe46eca1f32749b69420dd?v=a4e7d23495094644b939b08caba8e381&p=e908a8cd54804ddd910367abf03c8d0a) | ||
## Directory Structure | ||
- `.github/`: Settings for [Dependabot for updating dependencies](https://docs.github.com/en/code-security/supply-chain-security/customizing-dependency-updates) and [build/deploy pipelines with GitHub Actions](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions). |
13 changes: 13 additions & 0 deletionspackage.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "coder-v2", | ||
"description": "Coder V2 (Workspaces V2)", | ||
"repository": "https://github.com/coder/coder", | ||
"private": true, | ||
"scripts": { | ||
"format:check": "prettier --check '**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}'", | ||
"format:write": "prettier --write '**/*.{css,htmljs,json,jsx,md,ts,tsx,yaml,yml}'" | ||
}, | ||
"devDependencies": { | ||
"prettier": "2.5.1" | ||
} | ||
} |
8 changes: 8 additions & 0 deletionsyarn.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
prettier@^2.5.1: | ||
version "2.5.1" | ||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" | ||
integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.