Skip to content

Commit

Permalink
Merge pull request #68 from vocascan/experimental
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
noctera authored Nov 20, 2021
2 parents 4ac0e89 + ba37d11 commit 122da12
Show file tree
Hide file tree
Showing 68 changed files with 5,642 additions and 517 deletions.
17 changes: 0 additions & 17 deletions .env.example

This file was deleted.

10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,13 @@
"ignoreTemplateLiterals": true
}
]
}
},
"overrides": [
{
"files": ["vocascan-server.js", "cmd/**/*.js", "server.js"],
"rules": {
"global-require": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vocascan-server.js eol=lf
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://github.com/vocascan/vocascan-server/discussions
about: Please ask and answer questions here.
- name: Discord community server
url: https://discord.gg/Q3Qp72sKaQ
url: https://discord.vocascan.com
about: If you have discord, you can also ask questions here.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--- Provide a general summary of your changes in the Title above -->
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning -->

| Status | Type | Env Vars Change |
| :---: | :---: | :---: | :--: | :--: |
| :white_check_mark: Ready / :x: Hold | Feature/Bug/Tooling/Refactor/Hotfix | Yes/No |
| Status | Type | Env Vars Change |
| :---------------------------------: | :---------------------------------: | :-------------: |
| :white_check_mark: Ready / :x: Hold | Feature/Bug/Tooling/Refactor/Hotfix | Yes/No |

## Description

Expand Down
166 changes: 166 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: CI

on:
- push
- pull_request
- workflow_dispatch

env:
DOCKER_PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64/v8 #,linux/s390x,linux/ppc64le

jobs:
test:
name: 🧪 test
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install dependencies
run: npm i

- name: Lint
run: npm run lint -- --max-warnings=0

npm:
name: 📦 npm
needs: test
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/experimental' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Extract version
uses: actions/github-script@v5
id: version
with:
script: |
const { version } = require('./package.json')
const isMain = context.ref === 'refs/heads/main' && !version.includes('rc')
const isExperimental = context.ref === 'refs/heads/experimental' && version.includes('rc')
const tag = isMain ? 'latest'
: isExperimental ? 'experimental'
: null
if (!tag) {
core.setFailed('you may forgot to remove the rc label');
process.exit(1);
}
core.setOutput('tag', tag);
- name: Publish to npm
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ steps.version.outputs.tag }}
access: 'public'

- name: Publish to gpr
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.VOCASCAN_BOT_TOKEN }}
registry: https://npm.pkg.github.com/
tag: ${{ steps.version.outputs.tag }}
access: 'public'

docker:
name: 🐋 docker
needs: test
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/experimental' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Extract version
uses: actions/github-script@v5
id: version
with:
script: |
const { version } = require('./package.json')
const isMain = context.ref === 'refs/heads/main' && !version.includes('rc')
const isExperimental = context.ref === 'refs/heads/experimental' && version.includes('rc')
const tags = [
'type=ref,event=branch',
'type=ref,event=pr',
]
if (isMain || isExperimental) {
tags.push(`type=semver,pattern={{version}},value=${version}`)
}
if (isMain) {
tags.push(`type=semver,pattern={{major}}.{{minor}},value=${version}`)
tags.push(`type=semver,pattern={{major}},value=${version}`)
}
core.setOutput('tags', tags.join('\n'));
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
vocascan/server
ghcr.io/vocascan/server
tags: ${{ steps.version.outputs.tags }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-

- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: ${{ env.DOCKER_PLATFORMS }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: vocascan
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: vocascan
password: ${{ secrets.VOCASCAN_BOT_TOKEN }}

- name: Push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: ${{ env.DOCKER_PLATFORMS }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
80 changes: 0 additions & 80 deletions .github/workflows/docker.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/test.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
.env
*.sql
*.sqlite


vocascan.config.*
!vocascan.config.example.*
!docker/**/vocascan.config.*
docker/**/database
*.log
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Changelog

This changelog goes through all the changes that have been made in each release on the
[vocascan-server](https://github.com/vocascan/vocascan-server).

## [v1.1.0](https://github.com/vocascan/vocascan-server/releases/tag/v1.1.0) - xxxx.xx.xx

After some time, the new version of Vocascan Server has finally been released, with import/export features to share your
vocabulary packages. The new invitation codes will help you to keep your server all to yourself and your friends. We've
included major structural changes, working on a completely new configuration and starting option to make setup even
easier. Therefore we now publish the new CLI as a npm package to [npm](https://www.npmjs.com/package/@vocascan/server)
and the [GitHub Package Registry](https://github.com/vocascan/vocascan-server/packages/1077993). Additionally, there is
now a fully functional and configurable logger. To find out more, it's best to check out our
[documentation](https://docs.vocascan.com/#/vocascan-server/installation). Recently, there are templates for starting
with PM2, Docker or Traefik, which should provide flexibility.

!> Last but not least, we have adjusted the names of the packages. These are now only accessible under
`vocascan/server`, no longer via `vocascan/vocascan-server`.

- Features
- Vocascan cli (#63)
- Config logger (#61)
- Invite codes (#56)
- Import/Export function (#54)
- Bugfixes
- Role seeders for MySQL setup (#58)
- Swagger doc url behind reverse proxy (#55)
- fixed a bug with daily query limit

## [v1.0.0](https://github.com/vocascan/vocascan-server/releases/tag/v1.0.0) - 2021.06.13

Finally the time has come. The first release of Vocascan is ready. Vocascan is a server-client vocabulary trainer that
is intended to give the user many setting options so that he can adapt it to his personal learning strategies and
habits. All the basic functions of a vocabulary trainer are currently built in, making it fully functional. However,
there are still many more features to come. Due to the data protection guidelines, we cannot yet provide a public
server, which means that you currently have to host it yourself. But we are working as quickly as possible to use the
trainer offline.

- Basic functions
- Register/Login
- Change password function
- Delete user account function
- Add/modify/delete packages
- Add/modify/delete groups
- Add/modify/delete vocabs
- Get query vocabs
- Check answer
- Stats counter for each day
Loading

0 comments on commit 122da12

Please sign in to comment.