This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add tooling and other open-sauced cool stuff (#19)
* build: add development tooling * feat: add @open-sauced eslint configuration * ci: add tooling workflows and some readme docs * test: use custom badge blocks * style: test default alignment * style: test more custom css * style: test more custom css * style: adjust readme styling * docs: correct readme badges Co-authored-by: Brian Douglas <[email protected]>
- Loading branch information
Showing
17 changed files
with
6,445 additions
and
8,856 deletions.
There are no files selected for viewing
This file contains 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,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false |
This file contains 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,15 @@ | ||
process.env.NODE_ENV = 'development'; | ||
|
||
module.exports = { | ||
extends: [ | ||
'@astronomer/eslint-config-astro', | ||
], | ||
ignorePatterns: [ | ||
'build', | ||
'public', | ||
'stories', | ||
], | ||
rules: { | ||
'no-restricted-globals': [1], | ||
}, | ||
}; |
This file contains 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 @@ | ||
@bdougie |
This file contains 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,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: "thursday" | ||
time: "14:00" | ||
assignees: | ||
- "@open-sauced/maintainers" | ||
reviewers: | ||
- "@open-sauced/maintainers" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-major"] | ||
- dependency-name: "@storybook*" | ||
- dependency-name: "storybook*" | ||
open-pull-requests-limit: 15 | ||
labels: | ||
- chore | ||
- dependencies |
This file contains 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,67 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '56 5 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains 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
This file contains 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,53 @@ | ||
name: "Development" | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
docker: | ||
name: Build container | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "☁️ checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "🔧 setup buildx" | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: "🔧 cache docker layers" | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: "📦 docker build" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
outputs: type=docker,dest=/tmp/docker.tar | ||
push: false | ||
cache-from: type=gha, scope=${{ github.workflow }} | ||
cache-to: type=gha, scope=${{ github.workflow }} | ||
|
||
lint: | ||
name: Code standards | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "☁️ checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "🔧 setup node" | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16 | ||
|
||
- name: "🔧 install npm@latest" | ||
run: npm i -g npm@latest | ||
|
||
- name: "📦 install dependencies" | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: "🔍 lint code" | ||
run: npm run lint |
This file contains 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,144 @@ | ||
name: "Release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docker: | ||
name: Build container | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "☁️ checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "🔧 setup buildx" | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: "🔧 cache docker layers" | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: "🔧 docker meta" | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ github.repository }} | ||
tags: latest | ||
|
||
- name: "📦 docker build" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
outputs: type=docker,dest=/tmp/docker.tar | ||
push: false | ||
cache-from: type=gha, scope=${{ github.workflow }} | ||
cache-to: type=gha, scope=${{ github.workflow }} | ||
|
||
- name: "📂 docker artifacts" | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: docker | ||
path: /tmp/docker.tar | ||
|
||
build: | ||
name: Build application | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "☁️ checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "🔧 setup node" | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16 | ||
|
||
- name: "🔧 install npm@latest" | ||
run: npm i -g npm@latest | ||
|
||
- name: "📦 install dependencies" | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: "📊 repository visualizer" | ||
id: diagram | ||
uses: githubocto/[email protected] | ||
with: | ||
excluded_paths: "node_modules,build,.storybook,.netlify,.github,npm-shrinkwrap.json" | ||
output_file: "public/diagram.svg" | ||
should_push: false | ||
root_path: "src/" | ||
artifact_name: "diagram" | ||
|
||
- name: "🚀 static app" | ||
run: npm run build | ||
|
||
- name: "📂 production artifacts" | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
|
||
release: | ||
environment: | ||
name: production | ||
url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.semantic-release.outputs.release-tag }} | ||
name: Semantic release | ||
needs: | ||
- docker | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "☁️ checkout repository" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "📂 download docker artifacts" | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: docker | ||
path: /tmp | ||
|
||
- name: "📦 load tag" | ||
run: | | ||
docker load --input /tmp/docker.tar | ||
docker image ls -a | ||
- name: "📂 download build artifacts" | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
|
||
- name: "📂 download diagram artifacts" | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: diagram | ||
path: . | ||
|
||
- name: "🚀 release" | ||
id: semantic-release | ||
uses: open-sauced/semantic-release-conventional-config@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
cleanup: | ||
name: Cleanup actions | ||
needs: | ||
- release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "♻️ remove build artifacts" | ||
uses: geekyeggo/delete-artifact@v1 | ||
with: | ||
name: | | ||
build | ||
docker | ||
diagram |
File renamed without changes.
This file contains 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,18 +1,25 @@ | ||
# build output | ||
dist | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules/ | ||
.snowpack/ | ||
node_modules | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
# testing | ||
coverage | ||
|
||
# environment variables | ||
# production | ||
build | ||
|
||
# production | ||
storybook-static | ||
|
||
# misc | ||
.DS_Store | ||
.env | ||
.env.production | ||
npm-debug.log | ||
|
||
# jest test | ||
src/tests/__snapshots__/ | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
../.DS_Store | ||
../../.DS_Store |
This file contains 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,2 +1,12 @@ | ||
## force pnpm to hoist | ||
shamefully-hoist = true | ||
audit=false | ||
audit-level="moderate" | ||
engine-strict=true | ||
format-package-lock=true | ||
lockfile-version=3 | ||
loglevel="info" | ||
prefer-offline=true | ||
progress=false | ||
save-exact=false | ||
timing=false | ||
update-notifier=false | ||
yes=true |
Oops, something went wrong.