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

Fix check-version-and-changelog stop working properly #288 #291

Merged
merged 6 commits into from
Feb 13, 2024
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
6 changes: 4 additions & 2 deletions .github/has-functional-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile .gitignore .github/* .conda/*

last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` # --first-parent ensures we don't follow tags not published in master through an unlikely intermediary merge commit

echo "Last tagged commit: $last_tagged_commit"

if git diff-index --name-only --exit-code $last_tagged_commit -- . `echo " $IGNORE_DIFF_ON" | sed 's/ / :(exclude)/g'` # Check if any file that has not be listed in IGNORE_DIFF_ON has changed since the last tag was published.
then
echo "No functional changes detected."
exit 1
else
echo "The functional files above were changed."
fi
echo "The functional files above were changed."
exit 0
65 changes: 20 additions & 45 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
python-version: ["3.9.9", "3.10.6"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.os }}
Expand All @@ -33,7 +33,7 @@ jobs:
run: make build
- name: Cache release
id: restore-release
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.os }}
Expand All @@ -42,16 +42,16 @@ jobs:
runs-on: ubuntu-20.04
needs: [ build ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9.9
- name: Cache build
id: restore-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-ubuntu-20.04
Expand All @@ -70,16 +70,15 @@ jobs:
env:
# Needed for coveralls
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.os }}
Expand All @@ -90,39 +89,15 @@ jobs:
- name : coverage
run: coveralls --service=github

# Coverage will need GITHUB_TOKEN : "Running on Github Actions but GITHUB_TOKEN is not set."
# coverage:
# runs-on: ${{ matrix.os }}
# needs: [ build ]
# strategy:
# fail-fast: true
# matrix:
# os: [ "ubuntu-20.04" ] # On peut ajouter "macos-latest" si besoin
# python-version: ["3.9.9"]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v3
# with:
# python-version: ${{ matrix.python-version }}
# - name: Cache build
# id: restore-build
# uses: actions/cache@v3
# with:
# path: ${{ env.pythonLocation }}
# key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.os }}
# - name : coverage
# run: coveralls

check-version-and-changelog:
runs-on: ubuntu-20.04
needs: [ lint-files, build ] # TODO: Replace build by test-python
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9.9
- name: Check version number has been properly updated
Expand All @@ -138,11 +113,11 @@ jobs:
outputs:
status: ${{ steps.stop-early.outputs.has_functional_changes_status }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9.9
- id: stop-early
Expand All @@ -156,22 +131,22 @@ jobs:
PYPI_USERNAME: openfisca-bot
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9.9
- name: Cache build
id: restore-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-ubuntu-20.04
- name: Cache release
id: restore-release
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-ubuntu-20.04
Expand All @@ -191,7 +166,7 @@ jobs:
# Add openfisca channel for OpenFisca-Core
channels: conda-forge, openfisca
activate-environment: true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Conda config
Expand All @@ -214,7 +189,7 @@ jobs:
# Add openfisca channel for OpenFisca-Core
channels: conda-forge, openfisca
activate-environment: true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all the tags
- name: Install with conda
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

# 2.0.6 [#291](https://github.com/openfisca/openfisca-survey-manager/pull/291)

* Technical changes
- Fix the script check-version-and-changelog.sh to fix issue #288
- Upgrade CI actions

# 2.0.5 [#286](https://github.com/openfisca/openfisca-survey-manager/pull/286)

* New features
- Allows sub-annual weighted aggregates in compute_aggregate when the weights are annual.

# 2.0.4 [#283](https://github.com/openfisca/openfisca-survey-manager/pull/283)

- Correction function compute_pivot_tables in ReformScenario
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name = 'OpenFisca-Survey-Manager',
version = '2.0.4',
version = '2.0.6',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
Expand Down