Skip to content

Commit

Permalink
༼ つ ◕_◕ ༽つ give setup action for elide
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Oct 16, 2023
1 parent 74daee7 commit 00d23b0
Show file tree
Hide file tree
Showing 30 changed files with 56,356 additions and 9,407 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ lib/
dist/
node_modules/
coverage/
__tests__/
2 changes: 2 additions & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extends:
rules:
{
'camelcase': 'off',
'no-shadow': 'off',
'eslint-comments/no-use': 'off',
'eslint-comments/no-unused-disable': 'off',
'i18n-text/no-en': 'off',
Expand All @@ -61,6 +62,7 @@ rules:
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-require-imports': 'error',
Expand Down
40 changes: 18 additions & 22 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
# In TypeScript actions, `dist/index.js` is a special file. When you reference
# an action with `uses:`, `dist/index.js` is the code that will be run. For this
# project, the `dist/index.js` file is generated from other source files through
# the build process. We need to make sure that the checked-in `dist/index.js`
# file matches what is expected from the build.
#
# This workflow will fail if the checked-in `dist/index.js` file does not match
# what is expected from the build.
name: Check dist/
name: Check Dist

on:
push:
Expand All @@ -21,33 +13,38 @@ on:

jobs:
check-dist:
name: Check dist/
name: "Check: Dist"
runs-on: ubuntu-latest

permissions:
contents: read
statuses: write

steps:
- name: Checkout
- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
- name: "Setup: PNPM"
uses: pnpm/action-setup@v2
with:
version: 8.9.0

- name: "Setup: Node"
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
node-version: 20
cache: pnpm

- name: Install Dependencies
- name: "Setup: Install Dependencies"
id: install
run: npm ci
run: pnpm install && pnpm install -g turbo

- name: Build dist/ Directory
- name: "Build: Bundle"
id: build
run: npm run bundle
run: pnpm run ci:build

- name: Compare Expected and Actual Directories
- name: "Check: Compare Expected and Actual Directories"
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
Expand All @@ -56,9 +53,8 @@ jobs:
exit 1
fi
# If index.js was different than expected, upload the expected version as
# a workflow artifact.
- uses: actions/upload-artifact@v3
- name: "Build: Upload Artifact"
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous Integration
name: CI

on:
pull_request:
Expand All @@ -13,32 +13,37 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: "Setup: Checkout"
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
- name: "Setup: PNPM"
uses: pnpm/action-setup@v2
with:
version: 8.9.0

- name: "Setup: Node"
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
node-version: 20
cache: pnpm

- name: Install Dependencies
- name: "Setup: Install Dependencies"
id: npm-ci
run: npm ci
run: pnpm install

- name: Check Format
id: npm-format-check
run: npm run format:check
run: pnpm run format:check

- name: Lint
id: npm-lint
run: npm run lint
run: pnpm run lint

- name: Test
id: npm-ci-test
run: npm run ci-test
run: pnpm run ci:test

test-action:
name: GitHub Actions Test
Expand All @@ -52,9 +57,8 @@ jobs:
- name: Test Local Action
id: test-action
uses: ./
with:
milliseconds: 1000
with: {}

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
run: echo "${{ steps.test-action.outputs.path }}"
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
continue-on-error: true

permissions:
actions: read
Expand Down Expand Up @@ -41,8 +42,10 @@ jobs:

- name: Autobuild
id: autobuild
continue-on-error: true
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
id: analyze
continue-on-error: true
uses: github/codeql-action/analyze@v2
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,7 @@ __tests__/runner/*
.idea
.vscode
*.code-workspace

# Turbo Build
.turbo/cache
.turbo-cookie
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://npm.pkg.st/
timeout=30000
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist/
node_modules/
coverage/
coverage/
6 changes: 6 additions & 0 deletions .turbo/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"apiurl": "https://turbo.less.build",
"loginurl": "https://beta.less.build",
"teamslug": null,
"teamid": "waad|XZn2X9N9Fws_B8jWPv3jeczmxpS_BHMjLxT3jQFI6PQ"
}
6 changes: 2 additions & 4 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# Repository CODEOWNERS

* @actions/actions-runtime
* @ncalteen
* @elide-dev/engineering
* @sgammon
Loading

0 comments on commit 00d23b0

Please sign in to comment.