mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
deploy(ci): Added ci that takes care of most of husky's tasks
This commit is contained in:
1 parent
81d1d7fae7
commit
58160f2207
3 files changed
+75
-2
No files matched your search
@@ -0,0 +1,68 @@
|
|||||||
|
name: Tests and CI
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nui_preformatting_tests:
|
||||||
|
name: NUI Preformatting and Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
working-directory: phone
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# Make sure the actual branch is checked out when running on pull requests
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
# This is important to fetch the changes to the previous commit
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '14.x'
|
||||||
|
- name: Install dependencies NUI
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
- name: Prettify Code
|
||||||
|
uses: creyD/[email protected]
|
||||||
|
with:
|
||||||
|
# This part is also where you can pass other options, for example:
|
||||||
|
prettier_options: --write **/*.{js,jsx,ts,tsx,json,css,scss,md}
|
||||||
|
only_changed: True
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run Enzyme Tests
|
||||||
|
run: yarn test
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
game_scripts_test:
|
||||||
|
name: Formatting/Tests for Native Scripts
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
working-directory: resources
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# Make sure the actual branch is checked out when running on pull requests
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
# This is important to fetch the changes to the previous commit
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '14.x'
|
||||||
|
- name: Install dependencies NUI
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
- name: Prettify code
|
||||||
|
uses: creyD/[email protected]
|
||||||
|
with:
|
||||||
|
# This part is also where you can pass other options, for example:
|
||||||
|
prettier_options: --write **/*.{js,jsx,ts,tsx,json,css,scss,md}
|
||||||
|
only_changed: True
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run Jest Tests
|
||||||
|
run: yarn test
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
+2
-2
@@ -72,8 +72,8 @@
|
|||||||
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,scss,md}",
|
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,scss,md}",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
|
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
|
||||||
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.[jt]s?(x)",
|
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.{ts,js,tsx}",
|
||||||
"test:watch": "react-scripts test --watchAll --testMatch **/src/**/*.test.[jt]s?(x)",
|
"test:watch": "react-scripts test --watchAll --testMatch **/src/**/*.test.{ts,js,tsx}",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
|||||||
@@ -3032,6 +3032,11 @@ esutils@^2.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
|
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
|
||||||
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
|
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
|
||||||
|
|
||||||
|
esx.js@^1.1.5:
|
||||||
|
version "1.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/esx.js/-/esx.js-1.1.5.tgz#a6a9abb1b5ef6b6bdf73f1969eb917f667a438eb"
|
||||||
|
integrity sha512-6QJgvFvbr/d+eM6AhX7Tzz4lJjJnBnRUcomgzoRW9Jnok7nxmmDEtkGVWZijoSVenxfoUrY8wrf2C1Tg5OYNLg==
|
||||||
|
|
||||||
events@^3.0.0:
|
events@^3.0.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379"
|
resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379"
|
||||||
|
|||||||
Reference in new issue
Block a user