From 9bd6dcff942ea7a98ea15aa0eea68abbac714c1b Mon Sep 17 00:00:00 2001 From: Artem Shumeiko <53895552+artemonsh@users.noreply.github.com> Date: Tue, 23 May 2023 00:23:10 +0300 Subject: [PATCH 1/4] Create main.yml --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..2bbb1ac --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest From 7df8e34944d037b0016d22c4afa78197746e0d3a Mon Sep 17 00:00:00 2001 From: Artem Shumeiko <53895552+artemonsh@users.noreply.github.com> Date: Tue, 23 May 2023 00:28:42 +0300 Subject: [PATCH 2/4] Update main.yml --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2bbb1ac..43cd448 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,6 +21,9 @@ jobs: python -m pip install --upgrade pip pip install pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Create .env file + run : | + echo "${{secrets.CANDIES_ENV }}" > .env - name: Test with pytest run: | pytest From 468b358ca28b1fea21da4691883398d638d7ab05 Mon Sep 17 00:00:00 2001 From: Artem Shumeiko <53895552+artemonsh@users.noreply.github.com> Date: Tue, 23 May 2023 00:30:08 +0300 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43cd448..632a0fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Create .env file run : | - echo "${{secrets.CANDIES_ENV }}" > .env + echo "${{secrets.CANDIES_ENV }}" > .env-test - name: Test with pytest run: | pytest From 0e5cd1f481b7ecd19d0a168cbb930b5c0bcf56dd Mon Sep 17 00:00:00 2001 From: Artem Shumeiko <53895552+artemonsh@users.noreply.github.com> Date: Tue, 23 May 2023 00:32:02 +0300 Subject: [PATCH 4/4] Update main.yml --- .github/workflows/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 632a0fd..431b8a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,16 +6,14 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.9 uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + # Semantic version range syntax or exact version of a Python version + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip