Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to CI/CD #86

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,51 @@
---
name: CI/CD

on:

Check warning on line 17 in .github/workflows/ci-cd.yaml

View workflow job for this annotation

GitHub Actions / YAML Style Check

17:1 [truthy] truthy value should be one of [false, true]
pull_request:
push:
branches: [master]

env:
PYTHON_VERSION: "3.10"

jobs:
cancel-previous:
name: Cancel Previous Runs In Order to Allocate Action Resources Immediately for Current Run
if: github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.10.1
with:
access_token: ${{ github.token }}

yaml-lint:
name: YAML Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actionshub/yamllint@main

markdown-lint:
name: Markdown Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actionshub/markdownlint@main

linkChecker:
name: Link Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Link Checker
uses: lycheeverse/lychee-action@v1.9.0
with:
fail: true

sync-to-huggingface-space:
needs: [yaml-lint, markdown-lint, linkChecker]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://localhost:7860
2 changes: 2 additions & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules "~MD002", "~MD003", "~MD005", "~MD007", "~MD013", "~MD022", "~MD024", "~MD027", "~MD028", "~MD029", "~MD033", "~MD034", "~MD036", "~MD041", "~MD055", "~MD057"
style "#{File.dirname(__FILE__)}/markdownlint.rb"
23 changes: 23 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
extends: default
rules:
line-length:
max: 256
level: warning
document-start: disable
braces:
forbid: false
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
commas:
max-spaces-before: -1
min-spaces-after: 1
max-spaces-after: -1
brackets:
max-spaces-inside: -1
empty-lines:
max: 3
indentation:
spaces: 2
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ One morning I was studying German with the famous German WW2 movie
[_Generation War_](https://youtu.be/8s_0QteDapc?si=usMdIbY5Skfz0u1q). Managing to find its subtitles[^1][^2][^3] were
easy for me. A problem, however, soon arose as I proceeded with them: _the subtitles had errors - missing couple of
phrases every few other lines_. This was a big NO for language learners like me. In old days 10 years ago, I would've
reached a dead end...
reached a dead end...

[^1]: https://www.opensubtitles.org/en/subtitles/6243166/generation-war-eine-andere-zeit-de
[^2]: https://www.opensubtitles.org/en/subtitles/6243167/generation-war-ein-anderer-krieg-de
Expand All @@ -51,23 +51,28 @@ Being so excited, I decided to industrialize this process and hereby present it
__AI movie transcription service that targets specifically for language learners__

> [!NOTE]
>
>
> On name "__Tiger__"
>
> The project name _tiger_ was taken from the _German heavy tank of World War II -
> [Tiger I](https://tanks-encyclopedia.com/ww2/germany/panzer-vi_tiger.php#index17)_.
>
>
> I chose this name because the project idea was spawned from the study of German language. More importantly, _Tiger I_
> has been widely recognized as a revolutionary tank being a crown jewels in the history of warfare technology:
>
> has been widely recognized as a revolutionary tank being a crown jewels in the history of warfare technology:
>
> > _"It is tempting to view the appearance of the Tiger tank as revolutionary, ... the end result was a machine that
> > represented a quantum leap forward in tank design and changed everything - forever"_[^4]
>
>
> As _Tiger_ had steered the direction of next-generation heavy tank, this project has also revolutionized my view
> toward AI subconsciously and serves as an empirical guide on how I should make NLP more powerful for people with AI.

[^4]: _[Tiger tank : Panzerkampfwagen VI Tiger I Ausf. E (SdKfz 181): owner's workshop manual](https://a.co/d/28OzPsK)_, The Tank Museum, 2011. p.13

License
-------

The use and distribution terms for [tiger]() are covered by the [Apache License, Version 2.0].

[Apache License Badge]: https://img.shields.io/badge/Apache%202.0-F25910.svg?style=for-the-badge&logo=Apache&logoColor=white
[Apache License, Version 2.0]: https://www.apache.org/licenses/LICENSE-2.0

Expand All @@ -77,4 +82,4 @@ __AI movie transcription service that targets specifically for language learners
[Hugging Face sync status badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/tiger/ci-cd.yaml?branch=master&style=for-the-badge&logo=github&logoColor=white&label=Hugging%20Face%20Sync%20Up
[Hugging Face sync status URL]: https://github.com/QubitPi/tiger/actions/workflows/ci-cd.yaml

[Project Tiger on Hugging Face]: https://huggingface.co/spaces/QubitPi/tiger
[Project Tiger on Hugging Face]: https://huggingface.co/spaces/QubitPi/tiger
20 changes: 20 additions & 0 deletions markdownlint.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright Jiaqi Liu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

all
rule 'MD003', style: :setext_with_atx
rule 'MD004', style: :sublist
rule 'MD013', line_length: 120
rule 'MD029', style: :ordered
rule 'MD026', punctuation: ".,;:!?"
Loading