Merge branch 'develop' into swn
This commit is contained in:
commit
4a9dc4202c
9 changed files with 70 additions and 79 deletions
|
@ -1,49 +0,0 @@
|
||||||
version: 2.1
|
|
||||||
|
|
||||||
executors:
|
|
||||||
docker:
|
|
||||||
working_directory: /tmp/workspace
|
|
||||||
docker:
|
|
||||||
- image: docker:latest
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
parameters:
|
|
||||||
with_deploy:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
executor: docker
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- setup_remote_docker:
|
|
||||||
version: 19.03.13
|
|
||||||
- run:
|
|
||||||
name: Build
|
|
||||||
command: |
|
|
||||||
docker build -t misskey/misskey .
|
|
||||||
- when:
|
|
||||||
condition: <<parameters.with_deploy>>
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
name: Deploy
|
|
||||||
command: |
|
|
||||||
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
|
|
||||||
then
|
|
||||||
apk update && apk add jq
|
|
||||||
docker tag misskey/misskey misskey/misskey:$(cat package.json | jq -r .version)
|
|
||||||
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
|
||||||
docker push -a misskey/misskey
|
|
||||||
else
|
|
||||||
echo -e '\033[0;33mAborted deploying to Docker Hub\033[0;39m'
|
|
||||||
fi
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
docker:
|
|
||||||
jobs:
|
|
||||||
- docker:
|
|
||||||
name: auto-build
|
|
||||||
with_deploy: true
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only: master
|
|
|
@ -1,12 +0,0 @@
|
||||||
url: 'http://misskey.local'
|
|
||||||
port: 8080
|
|
||||||
db:
|
|
||||||
host: localhost
|
|
||||||
port: 5432
|
|
||||||
db: test-misskey
|
|
||||||
user: postgres
|
|
||||||
pass: ''
|
|
||||||
redis:
|
|
||||||
host: localhost
|
|
||||||
port: 6379
|
|
||||||
id: aid
|
|
21
.github/workflows/lint.yml
vendored
Normal file
21
.github/workflows/lint.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
- run: yarn install
|
||||||
|
- run: yarn lint
|
|
@ -1,4 +1,5 @@
|
||||||
name: Node.js CI
|
name: Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -7,12 +8,12 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
mocha:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 16.x]
|
node-version: [16.x]
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
@ -44,16 +45,43 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn mocha
|
||||||
|
|
||||||
lint:
|
e2e:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [16.x]
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:12.2-alpine
|
||||||
|
ports:
|
||||||
|
- 54312:5432
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: test-misskey
|
||||||
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
redis:
|
||||||
|
image: redis:4.0-alpine
|
||||||
|
ports:
|
||||||
|
- 56312:6379
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-node@v1
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: yarn install
|
- name: Install dependencies
|
||||||
- run: yarn lint
|
run: yarn install
|
||||||
|
- name: Check yarn.lock
|
||||||
|
run: git diff --exit-code yarn.lock
|
||||||
|
- name: Copy Configure
|
||||||
|
run: cp test/test.yml .config
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
- name: Test
|
||||||
|
run: yarn e2e
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"baseUrl": "http://localhost"
|
"baseUrl": "http://localhost:61812"
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,9 @@
|
||||||
"lint": "tslint 'src/**/*.ts'",
|
"lint": "tslint 'src/**/*.ts'",
|
||||||
"cy:open": "cypress open",
|
"cy:open": "cypress open",
|
||||||
"cy:run": "cypress run",
|
"cy:run": "cypress run",
|
||||||
"e2e": "start-server-and-test start:test http://localhost cy:run",
|
"e2e": "start-server-and-test start:test http://localhost:61812 cy:run",
|
||||||
"test": "cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
|
"mocha": "cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
|
||||||
|
"test": "npm run mocha",
|
||||||
"format": "gulp format"
|
"format": "gulp format"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
|
|
@ -10,7 +10,12 @@ import { defineComponent } from 'vue';
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: ['q'],
|
props: {
|
||||||
|
q: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
query: null,
|
query: null,
|
||||||
|
@ -21,10 +26,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search() {
|
search() {
|
||||||
const engine = this.$store.state.webSearchEngine ||
|
window.open(`https://www.google.com/search?q=${this.query}`, '_blank');
|
||||||
'https://www.google.com/search?q={{query}}';
|
|
||||||
const url = engine.replace('{{query}}', this.query)
|
|
||||||
window.open(url, '_blank');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<MkA class="item" active-class="active" to="/settings" v-click-anime>
|
<MkA class="item" active-class="active" to="/settings" v-click-anime>
|
||||||
<i class="fas fa-cog fa-fw"></i><span class="text">{{ $ts.settings }}</span>
|
<i class="fas fa-cog fa-fw"></i><span class="text">{{ $ts.settings }}</span>
|
||||||
</MkA>
|
</MkA>
|
||||||
<button class="item _button post" @click="post">
|
<button class="item _button post" @click="post" data-cy-open-post-form>
|
||||||
<i class="fas fa-pencil-alt fa-fw"></i><span class="text">{{ $ts.note }}</span>
|
<i class="fas fa-pencil-alt fa-fw"></i><span class="text">{{ $ts.note }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue