open-feature / python-sdk

Python SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
65 stars 18 forks source link

chore: optimize GitHub CI workflow #220

Closed federicobond closed 1 year ago

federicobond commented 1 year ago

This PR

Optimizes our GH workflows by running linters like black/flake8 and CodeQL in a separate job with a single Python version, drastically reducing the feedback time for builds. Tests still run on a version matrix.

It also removes the virtualenv configuration which is not necessary in CI since the machines are ephemeral anyway, and uses the official Python setup actions instead of Docker to further reduce the number of layers involved in the execution of the build.

TODO:

codecov[bot] commented 1 year ago

Codecov Report

Merging #220 (61ebcbc) into main (291b4ae) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #220   +/-   ##
=======================================
  Coverage   93.63%   93.63%           
=======================================
  Files          16       16           
  Lines         440      440           
=======================================
  Hits          412      412           
  Misses         28       28           
Flag Coverage Δ
unittests 93.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

github-advanced-security[bot] commented 1 year ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

federicobond commented 1 year ago

Indeed, I just didn't want to change too much before validating the approach. Will update the PR.

federicobond commented 1 year ago

Not sure where those missing build status come from 🤔

toddbaert commented 1 year ago

Not sure where those missing build status come from 🤔

I can't quite understand it either. I wonder if it's just an artifact of the changes and once it's merged it will work subsequently?

federicobond commented 1 year ago

@toddbaert the problem is that it does not let me merge without every status check passing. I will open a separate PR to see if that solves it.

federicobond commented 1 year ago

@toddbaert I think it MIGHT have to do with some of these checks being marked as required and GH not preserving the mapping from the previous configuration. Do you have permission to disable them temporarily and then enable the new ones?

beeme1mr commented 1 year ago

@federicobond we had branch protection enabled that look for the old job names.