Skip to content

Commit

Permalink
Merge pull request #219 from n0th1ng-else/bump
Browse files Browse the repository at this point in the history
  • Loading branch information
n0th1ng-else authored Feb 17, 2023
2 parents 11ebfcf + 32e6140 commit aeb247a
Show file tree
Hide file tree
Showing 63 changed files with 2,341 additions and 1,891 deletions.
32 changes: 11 additions & 21 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
const getCfg = () => ({
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3'
}
],
env: {
node: true,
browser: true,
es2017: true
},
globals: {
runtime: true
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
rules: {
'no-mixed-spaces-and-tabs': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-console': 'error'
},
settings: {
'svelte3/typescript': () => require('typescript'),
'svelte3/ignore-styles': () => true
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2019
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
});

module.exports = getCfg();
};
15 changes: 4 additions & 11 deletions .github/workflows/browserlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@ jobs:
- name: ⬇️ Checkout
uses: actions/checkout@v2

- name: 📓️ Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v3
with:
path: ./.nvmrc
trim: true

- name: ▶️ Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: 📖️ Restore cached node_modules
uses: actions/cache@v2
Expand All @@ -37,7 +30,7 @@ jobs:
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: ▶️ Install Dependencies
run: npm i
run: npm ci

- name: 🚧 Create a branch
uses: peterjgrainger/[email protected]
Expand Down
39 changes: 10 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
with:
path: ./.nvmrc
trim: true

- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: Restore cached node_modules
uses: actions/cache@v2
Expand All @@ -41,8 +34,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Read VERSION file
id: getversion
run: echo "::set-output name=version::$(cat .VERSION)"
id: version
run: |
APP_VER=$(cat .VERSION)
echo "version=$APP_VER" >> $GITHUB_OUTPUT
docker:
runs-on: ubuntu-latest
Expand All @@ -55,17 +50,10 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
with:
path: ./.nvmrc
trim: true

- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down Expand Up @@ -103,17 +91,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
with:
path: ./.nvmrc
trim: true

- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: Install Railway CLI
run: npm i -g @railway/cli
Expand Down
59 changes: 19 additions & 40 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ jobs:
runs-on: ubuntu-latest
name: Fetch next version
outputs:
version: ${{ steps.getversion.outputs.version }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
with:
path: ./.nvmrc
trim: true

- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: Restore cached node_modules
uses: actions/cache@v2
Expand All @@ -41,27 +34,26 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Read VERSION file
id: getversion
run: echo "::set-output name=version::$(cat .VERSION)"
id: version
run: |
APP_VER=$(cat .VERSION)
echo "version=$APP_VER" >> $GITHUB_OUTPUT
echo "Version: $APP_VER"
test:
validate:
runs-on: ubuntu-latest
name: Validate the code
strategy:
matrix:
cmd: [check, 'lint:all', 'format:check']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
with:
path: ./.nvmrc
trim: true

- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: Restore cached node_modules
uses: actions/cache@v2
Expand All @@ -72,34 +64,21 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Validate the project
run: npm run validate

- name: Lint the project
run: npm run lint:all

- name: Check the formatting in the project
run: npm run format:check
- name: Run ${{ matrix.cmd }}
run: npm run ${{ matrix.cmd }}

sandbox:
runs-on: ubuntu-latest
name: Deploy to sandbox
needs: [test, version]
needs: [validate, version]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read NodeJS version from .nvmrc
id: node-version
uses: juliangruber/read-file-action@v1
with:
path: ./.nvmrc
trim: true

- name: Setup NodeJS using the obtained nvm version
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node-version.outputs.content }}
node-version-file: '.nvmrc'

- name: Install Railway CLI
run: npm i -g @railway/cli
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ public/*
.DS_Store
.svelte-kit/
.VERSION

vite.config.ts.*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.17.1
18.14.0
12 changes: 4 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"printWidth": 100,
"useTabs": true,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf",
"svelteSortOrder": "options-scripts-markup-styles",
"svelteStrictMode": true,
"svelteBracketNewLine": true,
"svelteAllowShorthand": false
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.17.1
FROM node:18.14.0

EXPOSE 8080

Expand Down Expand Up @@ -55,4 +55,6 @@ RUN npm run build

RUN find $APP_DIR/src -type f | xargs -L1 rm -f

USER node

CMD ["npm", "start"]
Loading

0 comments on commit aeb247a

Please sign in to comment.