-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI for better error catching (#3)
* feat: add CI * feat: add a seperate action to setup project * fix: correct eslint commands * fix: set updated node versions
- Loading branch information
1 parent
a61d45f
commit 237b4d4
Showing
3 changed files
with
74 additions
and
3 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,24 @@ | ||
name: Setup Project | ||
description: Installs Node.js, NPM and dependencies and sets up the project | ||
|
||
inputs: | ||
DECRYPTION_SECRET: | ||
description: The secret used to decrypt the files | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'package.json' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci --prefer-offline --no-audit --progress=false | ||
|
||
- uses: amplium/git-crypt-action@master | ||
with: | ||
key_encoded: ${{ inputs.DECRYPTION_SECRET }} |
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,44 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup project | ||
uses: ./.github/actions/setup-project | ||
with: | ||
DECRYPTION_SECRET: ${{ secrets.DECRYPTION_SECRET }} | ||
|
||
- run: npm run eslint:quiet | ||
|
||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup project | ||
uses: ./.github/actions/setup-project | ||
with: | ||
DECRYPTION_SECRET: ${{ secrets.DECRYPTION_SECRET }} | ||
|
||
- run: npm run prettier:check |
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