-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BOTH: python ✅, python2 ✅, python3 ✅
- Loading branch information
Showing
2 changed files
with
71 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the | ||
# source code and run tests across different versions of node | ||
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: detect_python | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] # https://nodejs.org/en/about/releases/ | ||
steps: | ||
- run: brew install python-launcher # just to ensure this does not create conflicts | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
|
||
# GitHub Actions defaults to having both Python 2 and 3 installed with `python` always pointing to `python3` | ||
- name: "BOTH: python ✅, python2 ✅, python3 ✅" | ||
run: | | ||
py --list | ||
echo -n "python " && python --version | ||
echo -n "python2 " && python2 --version | ||
echo -n "python3 " && python3 --version | ||
npm run ci | ||
# Let's disable Python 3 | ||
- name: "PY2 ONLY: python 🚫, python2 ✅, python3 🚫" | ||
run: | | ||
sudo mv /usr/bin/python3.8 /usr/bin/python3.8.disabled | ||
py --list | ||
echo -n "python " && python --version || true | ||
echo -n "python2 " && python2 --version | ||
echo -n "python3 " && python3 --version || true | ||
npm run ci || true | ||
# Let's disable Python 2 | ||
- name: "NONE: python 🚫, python2 🚫, python3 🚫" | ||
run: | | ||
sudo mv /usr/bin/python2.7 /usr/bin/python2.7.disabled | ||
py --list || true | ||
echo -n "python " && python --version || true | ||
echo -n "python2 " && python2 --version || true | ||
echo -n "python3 " && python3 --version || true | ||
npm run ci || true | ||
# Let's re-enable Python 3 | ||
- name: "Py3 ONLY: python ✅, python2 🚫, python3 ✅" | ||
run: | | ||
sudo mv /usr/bin/python3.8.disabled /usr/bin/python3.8 | ||
py --list | ||
echo -n "python " && python --version | ||
echo -n "python2 " && python2 --version || true | ||
echo -n "python3 " && python3 --version | ||
npm run ci || true | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.