From e4051c005a05c65f9bfe600f45b49a0c1915c792 Mon Sep 17 00:00:00 2001 From: hoangvv Date: Wed, 15 Jan 2025 09:17:49 +0700 Subject: [PATCH] update @native --- .gitea/workflows/setup_native.yml | 53 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/setup_native.yml b/.gitea/workflows/setup_native.yml index 0aacdb763..fa308740c 100644 --- a/.gitea/workflows/setup_native.yml +++ b/.gitea/workflows/setup_native.yml @@ -1,45 +1,42 @@ name: Setup Native Action + on: push: - branches: + branches: - main - strategy: - matrix: - python: - - 3.12.7 -jobs: - # test: - # runs-on: host - # steps: - # - name: Checkout Repository - # uses: actions/checkout@v4 - # with: - # ref: ${{ github.ref_name }} - # - name: test venv - # run: ${{ github.workspace }}/venv/bin/pip --version +jobs: setup_native: if: contains(github.event.head_commit.message, '@native') - runs-on: host + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.12.7] steps: - name: Checkout Repository uses: actions/checkout@v4 with: ref: ${{ github.ref_name }} - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python }} - - - name: Create python virtualenv - run: python3 -m venv venv + python-version: ${{ matrix.python-version }} - - name: Setup - run: make install + - name: Create Python virtual environment + run: python -m venv venv + + - name: Activate virtual environment and install dependencies + run: | + source venv/bin/activate + make install + + - name: Generate Config + run: | + source venv/bin/activate + make gen_config - - name: Generate Config - run: make gen_config - - name: Run Tests - run: make run_test + run: | + source venv/bin/activate + make run_test