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

bump deprecated artifact version to v4 #3

Merged
merged 11 commits into from
Jan 10, 2025
4 changes: 2 additions & 2 deletions .github/actions/install-dependencies/action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ python -m pip install --upgrade pip

if [[ "${INSTALL_REQUIREMENTS}" == "true" ]]; then
echo "Installing code requirements"
pip install -r plugin_scripts/requirements.lock
pip install --no-cache-dir -r plugin_scripts/requirements.lock
fi

if [[ "${INSTALL_TEST_REQUIREMENTS}" == "true" ]]; then
echo "Installing test requirements"
pip install -r requirements-test.txt
pip install --no-cache-dir -r requirements-test.txt
fi
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: ["main"]

env:
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.11"

jobs:

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@ on:
push:
branches: ["main"]

env:
PYTHON_VERSION: "3.10"

jobs:
test:
name: Pytest
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ]
# Versions available: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python-version: [ "3.9.0", "3.10.0", "3.11.11" ]
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: ${{ matrix.python-version }}
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
requirements: "true"
test-requirements: "true"

- name: Run pytest
run: pytest --cov deploy tests/test_insert_rows.py --cov-report xml:coverage-${{ env.PYTHON_VERSION }}.xml --junitxml=test-results-${{ env.PYTHON_VERSION }}.xml
run: pytest --cov deploy tests/test_insert_rows.py --cov-report xml:coverage-${{ matrix.python-version }}.xml --junitxml=test-results-${{ matrix.python-version }}.xml

- name: Upload pytest test results artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ env.PYTHON_VERSION }}
path: test-results-${{ env.PYTHON_VERSION }}.xml
name: pytest-results-${{ matrix.python-version }}
path: test-results-${{ matrix.python-version }}.xml
retention-days: 3
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}

- name: Upload coverage results artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pytest-coverage-${{ env.PYTHON_VERSION }}
path: coverage-${{ env.PYTHON_VERSION }}.xml
name: pytest-coverage-${{ matrix.python-version }}
path: coverage-${{ matrix.python-version }}.xml
retention-days: 3
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v4] - 2025-01-10

### Added

- CI: Fix matrix actions workflow
- CI: Disable pip cache for installations

### Updated

- CI: Deprecated `actions/upload-artifact` version
- CI: (3.8 -> 3.11)
- Docker image - Python version (3.8 -> 3.11)

### Removed

- CI: Python matrix test versions 3.6 & 3.7

## [v3] - 2021-12-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.18-slim-bullseye AS builder
FROM python:3.11.11-slim-bookworm AS builder

LABEL org.opencontainers.image.source=https://github.com/Atom-Learning/bigquery-upload-action
LABEL org.opencontainers.image.description="This Github action can be used to upload samples to BigQuery table."
Expand Down
Loading