starter-workflows | Accelerating new GitHub Actions workflows | BPM library
kandi X-RAY | starter-workflows Summary
kandi X-RAY | starter-workflows Summary
These are the workflow files for helping people get started with GitHub Actions. They're presented whenever you start to create a new GitHub Actions workflow.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of starter-workflows
starter-workflows Key Features
starter-workflows Examples and Code Snippets
Community Discussions
Trending Discussions on starter-workflows
QUESTION
The following GitHub Pylint starter-workflow fails with lots of pylint
F0001 errors.
This is the github-workflow source code:
...ANSWER
Answered 2021-Aug-20 at 10:07The GitHub action workflow contains a bug over here:
QUESTION
I am building a python project -- potion
. I want to use Github actions to automate some linting & testing before merging a new branch to master.
To do that, I am using a slight modification of a Github recommended python actions starter workflow -- Python Application.
During the step of "Install dependencies" within the job, I am getting an error. This is because pip is trying to install my local package potion
and failing.
The code that is failing if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
The corresponding error is:
...ANSWER
Answered 2021-Jun-11 at 14:29The "package under test", potion
in your case, should not be part of the requirements.txt. Instead, simply add your line
QUESTION
I have a python package, and I am using poetry
for dependency management and packaging.
In my local environment, I am using tox
to test the package in multiple python version.
How can I use GitHub actions to test my package, everytime there is a push or pull request ?
Things that I have tried:
- https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
(this official action installs via
pip
andrequirements.txt
, but I am using poetry) - https://github.com/abatilo/actions-poetry
(this action, can install poetry, but using
pip
, which is not recommended by poetry, as it can cause conflict with my application dependencies, see issue ) - https://github.com/ymyzk/tox-gh-actions (should I use this ? why not rather run
pytest
in every matrix (of github actions), this action seems to defeat the purpose of tox)
I want to test my python code in gh-actions.
in my situation, what should I actually use ?
what are the best practices ? and most optimum tool
...ANSWER
Answered 2021-Apr-14 at 12:11The beauty of tox
is that you can run it both locally and on CI.
You have a high chance of a successful CI when it passes locally, and also you only need to define the test requirements and the test setup once, in one file.
To do so, I recommend using the mentioned tox-gh-actions
.
I applied this pattern to dozens of repositories with success.
I recommend the following blog post which gives a great introduction to this setup:
https://hynek.me/articles/python-github-actions/
You can have a look at the tox.ini and the gh action config file for e.g. Flask-Reuploaded.
As to your question about running pytest in every matrix... the drawback here is that you need to take care of the test setup yourself, and you have to define everything at two places, tox.ini
for local testing and in the yaml config for gh actions.
QUESTION
I have set up a Google Cloud Platform kubernetes cluster (and Container Registry) with source code on GitHub. Source code is divided into folders with separate Dockerfiles for each microservice.
I want to set up CI/CD using GitHub actions.
As far as I understand, the default GKE workflow will connect to gcloud using secrets, build the images and push them to Container Registry. And then perform an update.
My questions- How is the deployment performed?
- What is kustomize for?
- Do I have to configure on gcloud anything else than GKE key / token
- Suppose I want to update multiple docker images. Will it suffice to build multiple images and push them? Like below (a little bit simplified for clarity), or do I have to also modify the Deploy job:
ANSWER
Answered 2021-Apr-09 at 18:33How is the deployment performed?
To know how to deploy or run this workflow please refer this documentation
What is kustomize for?
kustomize is a configuration mangement for application configuration
Do I have to configure on gcloud anything else than GKE key / token
You don't have to unless you are adding additional layer of security for authenticating the workflow.
Suppose I want to update multiple docker images. Will it suffice to build multiple images and push them? Like below (a little bit simplified for clarity), or do I have to also modify the Deploy job
I think no need for modification of deploy job. It is enough to build multiple images and push them into the GCR
QUESTION
I'm new to GitHub Actions (and continuous integration in general). I was just reading Using Node.js with GitHub Actions and I found this snippet there from the Node.js workflow template:
...ANSWER
Answered 2020-Jul-09 at 18:47Node.js versions 8, 10 and 12 are commonly used versions of Node.js. Versions 9 and 11 are considered experimental, since they are odd numbers, and therefore do not get LTS (Long Term Support). On the other hand, versions 8, 10 and 12 are stable.
Firebase cloud functions require either Node.js version 8 or 10, showing that versions 8 and 10 are still quite widely used.
Node.js version 14 was released a few months ago, but I doubt people will move to it until a while later when most of the bugs have been fixed, so it is not entirely necessary to test it, but you can if you want.
As you can see, Node.js versions 8, 10 and 12 are the most widely used versions of Node.js and therefore, it would be a good idea to make sure that your JavaScript code works with those 3 versions to ensure a lot of people can use your code.
If you want to ensure complete compatibility, you can test with even more versions of Node.js, but I doubt you would need to, as Node.js is usually quite backwards-compatible.
If you want to see which versions of Node.js are currently being supported, visit the Node.js releases page.
QUESTION
We are trying to enable experimental features on the ubuntu-latest image on github workflows, since would like to use squash
to reduce image size. However this is not possible as we get the following error:
/home/runner/work/_temp/59d363d1-0231-4d54-bffe-1e3205bf6bf3.sh: line 3: /etc/docker/daemon.json: Permission denied
for the following workflow:
...ANSWER
Answered 2020-Feb-28 at 14:56We have verified that the daemon.json file is properly updated
It looks like it's not properly updated, based on your error message:
/home/runner/work/_temp/59d363d1-0231-4d54-bffe-1e3205bf6bf3.sh: line 3: /etc/docker/daemon.json: Permission denied
What's going on here? Well, the sudo
command will run the given command as root
. But you're doing a shell redirect, which is handled by the shell itself, not by sudo
. In other words, you're redirecting the output of sudo.
If you want to write to a file as root then you'll need to actually run a command that writes the file, and then run that using sudo. For example:
QUESTION
Let's take this workflow as an example which is based on the NodeJS starter workflow.
...ANSWER
Answered 2020-Feb-02 at 19:26As far as I can tell, the CI
variable is there for compatibility with other CI systems. Here are the facts as I know them:
- GitHub Actions itself, does not have any use or need for the
CI
variable. - Other CI systems - like Travis and CircleCI - always set
CI=1
. - Unlike other systems, GitHub Actions does not set
CI=true
, since it is not intended for CI only. Instead, it setsGITHUB_ACTIONS=true
. - The conventional use for the
CI
variable, is so that your tests and app configuration can check for its existence, and do something differently if they need to (for example, skip certain tests on CI, or configure a different setting when on CI).
If your code and test code do not have the CI
variable in them, then you can probably omit this setting and have the same result.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install starter-workflows
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page