Merge branch 'develop' into swn

This commit is contained in:
tamaina 2021-10-28 20:36:20 +09:00
commit 4a9dc4202c
9 changed files with 70 additions and 79 deletions

View file

@ -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

View file

@ -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
View 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

View file

@ -1,4 +1,5 @@
name: Node.js CI
name: Test
on:
push:
branches:
@ -7,12 +8,12 @@ on:
pull_request:
jobs:
build_and_test:
mocha:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [16.x]
services:
postgres:
@ -44,16 +45,43 @@ jobs:
- name: Build
run: yarn build
- name: Test
run: yarn test
run: yarn mocha
lint:
e2e:
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:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: yarn install
- run: yarn lint
node-version: ${{ matrix.node-version }}
- name: Install dependencies
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

View file

@ -1,3 +1,3 @@
{
"baseUrl": "http://localhost"
"baseUrl": "http://localhost:61812"
}

View file

@ -28,8 +28,9 @@
"lint": "tslint 'src/**/*.ts'",
"cy:open": "cypress open",
"cy:run": "cypress run",
"e2e": "start-server-and-test start:test http://localhost cy:run",
"test": "cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"e2e": "start-server-and-test start:test http://localhost:61812 cy:run",
"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"
},
"resolutions": {

View file

@ -10,7 +10,12 @@ import { defineComponent } from 'vue';
import * as os from '@client/os';
export default defineComponent({
props: ['q'],
props: {
q: {
type: String,
required: true,
}
},
data() {
return {
query: null,
@ -21,10 +26,7 @@ export default defineComponent({
},
methods: {
search() {
const engine = this.$store.state.webSearchEngine ||
'https://www.google.com/search?q={{query}}';
const url = engine.replace('{{query}}', this.query)
window.open(url, '_blank');
window.open(`https://www.google.com/search?q=${this.query}`, '_blank');
}
}
});

View file

@ -35,7 +35,7 @@
<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>
</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>
</button>
</div>