Skip to content
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
20 changes: 6 additions & 14 deletions .github/workflows/ci-page-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ on:
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
# Allows you to run this workflow manually
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
Expand All @@ -30,6 +27,9 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup V
uses: vlang/setup-v@v1.3
with:
Expand All @@ -38,24 +38,16 @@ jobs:
- name: V doctor
run: v doctor

- name: Install ini
run: |
v install Ddiidev.ini

- name: Move ini source code to path start
run: sudo mv ~/.vmodules/ddiidev/ini /ini

- name: Construct doc
run: v doc -comments -readme -f html -m /ini
run: v doc -comments -readme -f html -m .

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '/ini/_docs'
path: './_docs'

- name: Deploy to GitHub Pages
id: deployment
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ on:
- main

jobs:

fmt-check:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup V
uses: vlang/setup-v@v1.3
with:
Expand All @@ -30,20 +32,16 @@ jobs:
- name: V doctor
run: v doctor

- name: Install ini
run: |
v install Ddiidev.ini

- name: Move ini source code to path start
run: mv ~/.vmodules/ddiidev/ini ~/ini

- name: Verify Fmt
run: v fmt -verify ~/ini
run: v fmt -verify .

run-tests:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup V
uses: vlang/setup-v@v1.3
with:
Expand All @@ -52,12 +50,5 @@ jobs:
- name: V doctor
run: v doctor

- name: Install ini
run: |
v install Ddiidev.ini

- name: Move ini source code to path start
run: mv ~/.vmodules/ddiidev/ini ~/ini

- name: Execute Tests using Pure V Backend
run: v -cc tcc -stats test ~/ini
- name: Execute Tests using GCC
run: v -cc gcc -stats test .
4 changes: 3 additions & 1 deletion tests/deserialize_to_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ pub:
valid bool
}

const str_ini = r'
const (
str_ini = r'
[conf]
conf1=123
conf2= 321
Expand All @@ -45,6 +46,7 @@ const str_ini = r'
pass1= 12345
valid=?
'
)

fn test_parser_valid_true() {
local_ini := tests.str_ini.replace('?', 'true')
Expand Down
4 changes: 3 additions & 1 deletion tests/ioini_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ module tests
import os
import ini { deserialize, read_ini, serrialize, write_ini }

const ini_file_temp = 'temp_ini/test.ini'
const (
ini_file_temp = 'temp_ini/test.ini'
)

fn test_serrialize() {
restart()
Expand Down
Loading