diff --git a/.github/workflows/ci-page-doc.yml b/.github/workflows/ci-page-doc.yml index b321462..5de9864 100644 --- a/.github/workflows/ci-page-doc.yml +++ b/.github/workflows/ci-page-doc.yml @@ -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 @@ -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: @@ -38,15 +38,8 @@ 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 @@ -54,8 +47,7 @@ jobs: - 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 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7d5ea5..227e9ce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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: @@ -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 . diff --git a/tests/deserialize_to_test.v b/tests/deserialize_to_test.v index 35566c4..69e9803 100644 --- a/tests/deserialize_to_test.v +++ b/tests/deserialize_to_test.v @@ -35,7 +35,8 @@ pub: valid bool } -const str_ini = r' +const ( + str_ini = r' [conf] conf1=123 conf2= 321 @@ -45,6 +46,7 @@ const str_ini = r' pass1= 12345 valid=? ' +) fn test_parser_valid_true() { local_ini := tests.str_ini.replace('?', 'true') diff --git a/tests/ioini_test.v b/tests/ioini_test.v index e808182..3ac36b1 100644 --- a/tests/ioini_test.v +++ b/tests/ioini_test.v @@ -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()