Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove node modules and configure ncc #35

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

Merged
merged 5 commits into from
Nov 6, 2019
Merged

Conversation

konradpabjan
Copy link
Contributor

@konradpabjan konradpabjan commented Nov 5, 2019

Relevant Issue: #11

Removing node_modules/ and lib/ from the master branch. In the releases branch, ncc is now being used to compile all of the necessary files into a single file dist/index.js

Going off of examples here: https://github.com/actions/cache/blob/releases/v1/package.json and here: actions/javascript-action#5

Tested in private repository with existing action: uses: actions/setup-python@v1 and with the new changes uses: actions/setup-python@konradpabjan/ncc, and confirming that it is working as expected:

Full yaml:

name: Python
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest  
    strategy:
      matrix:
        version: [ '2.x', '3.x', 'pypy2', 'pypy3' ]
    name: Python ${{ matrix.python-version }} sample
    steps:
      - uses: actions/checkout@master
      - name: Setup python
        uses: actions/setup-python@konradpabjan/ncc
        with:
          version: ${{ matrix.python-version }}
          architecture: x64
      - run: python my_script.py

Passing runs

image

@konradpabjan
Copy link
Contributor Author

konradpabjan commented Nov 5, 2019

A lot of changes here since I ended up deleting node_modules and lib. Main files to look out for:

  • action.yml
  • .gitignore
  • package.json

Also relavent

  • dist/index.js
  • package-lock.json

@joshmgross
Copy link

With early documentation, we often recommended using actions at master (setup-python@master), and this will be a breaking change for them (action will just stop working).

Do we know how many users are using this action on the master branch? Are we prepared/willing to break all of those users?

If not, we can just put dist/index.js in master as well

@brcrista
Copy link
Contributor

brcrista commented Nov 6, 2019

@joshmgross to your earlier comment, from #11:

We will support master in a warned but deprecated state for ~1 month.

@konradpabjan have we deprecated master yet?

@konradpabjan
Copy link
Contributor Author

If not, we can just put dist/index.js in master as well

The plan all along was to put dist/index.js into master as well as the releases branch so there should be no deprecation or breaking changes. The releases branch will have long term supported stable changes, while master will have the latest and greatest that can sometimes break (the changes in this PR don't break anything). After some period of time in the master branch, changes can be ported over to the releases branch.

What's described at the top of #11, is no longer 100% accurate. Originally node_modules was going to be removed in the master branch and kept inside the releases branch so that the master branch wasn't going to be usable. This was all before ncc was even suggested and we've decided against using this approach.

@konradpabjan
Copy link
Contributor Author

@konradpabjan have we deprecated master yet?

So we're not going to be deprecating master. I makes it possible for people to use it and test it out early if they really want. It also just seems weird to always have a not working action in the master branch.

What we could do is add a warning message inside setup-python.ts just inside the master branch to let early adopters know that they should use v1

@joshmgross
Copy link

The plan all along was to put dist/index.js into master as well as the releases branch so there should be no deprecation or breaking changes.

I see, I missed it in the big set of files in the PR 👍

Copy link

@joshmgross joshmgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you run a test using setup-python@konradpabjan/ncc?

@konradpabjan
Copy link
Contributor Author

Have you run a test using setup-python@konradpabjan/ncc?

Yup, see the screenshot attached in the top description 😃
Full run located here: https://github.com/bbq-beets/konradpabjan-testing/runs/290026972#step:3:1

@konradpabjan konradpabjan merged commit 6e5196c into master Nov 6, 2019
@konradpabjan konradpabjan deleted the konradpabjan/ncc branch November 6, 2019 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants