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

Reproducible installs with npm #480

Merged
merged 3 commits into from
Mar 31, 2023
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
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

name: Build ZIP File
on:
on:
pull_request:
push:
workflow_dispatch:
Expand All @@ -16,10 +16,10 @@ jobs:
- name: Setup node env
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: Install dependencies
run: npm i
run: npm ci

- name: Copy Webpack config
run: cp ./webpack/.env-example ./webpack/.env
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
rm postcss.config.js
rm tsconfig.json
rm webpack.config.js

- name: Create & Upload artifact
uses: actions/upload-artifact@v1
with:
Expand All @@ -65,17 +65,17 @@ jobs:
uses: actions/download-artifact@v1
with:
name: ${{ github.event.repository.name }}

- id: release_info
uses: toolmantim/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare for Release
run: |
cd ${{ github.event.repository.name }}
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}

- name: Clean existing assets
shell: bash
run: |
Expand All @@ -87,7 +87,7 @@ jobs:
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to GitHub Release
uses: actions/[email protected]
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
node: [16]

steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup node env
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm i
run: npm ci

- name: Generate
run: npm run build-storybook
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ jobs:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: 16

- name: Lint scss
run: npm install && npm run scss-lint
run: npm ci && npm run scss-lint
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: 16

- name: Lint js
run: touch ./webpack/.env && npm install && npm run lint
run: touch ./webpack/.env && npm ci && npm run lint
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
name: Run unit tests
strategy:
matrix:
js: [ '14' ]
js: [ '16' ]
steps:
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.js }}

Expand All @@ -24,5 +24,5 @@ jobs:
restore-keys: ${{ runner.os }}-node-

- name: Run tests
run: npm install && npm run test
run: npm ci && npm run test
working-directory: ./
6 changes: 3 additions & 3 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: 16

- name: Build and check types
run: touch ./webpack/.env && npm install && npm run build
run: touch ./webpack/.env && npm ci && npm run build
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ There are few things to do before you are ready to contribute.

First you need to install every node module:

`npm i`
`npm ci`

then create a `.env` file inside the *webpack* folder by copying `webpack/.env-example` and complete it with your environment's informations. Please use a free tcp port.

Expand All @@ -35,7 +35,7 @@ then build assets:
### Good practices

- Follow the BEM convention
- Be careful about creating SCSS files in the right folder, refer to the [documentation](https://build.prestashop.com/hummingbird/) for further informations.
- Be careful about creating SCSS files in the right folder, refer to the [documentation](https://build.prestashop.com/hummingbird/) for further informations.
- When you want to submit a PR, please make sure that you ran both linters using `npm run lint-fix && npm run scss-fix` and fixed every lint issues.
- If your PR is a work in progress, make sure that you use the Github draft mode.
- Fill the PR template as much as possible, it's important to speed the process of testing, reviewing...
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Same as the PrestaShop project, you need at least **NodeJS 14.x** and **NPM 7**

First you need to install every node module:

`npm i`
`npm ci`

then create a `.env` file inside the *webpack* folder by copying `webpack/.env-example` and complete it with your environment's informations. Please use a free tcp port.

Expand All @@ -39,6 +39,6 @@ When develop is merged into master, the Storybook is delivered almost instantly

## License

This theme is released under the [Academic Free License 3.0][AFL-3.0]
This theme is released under the [Academic Free License 3.0][AFL-3.0]

[AFL-3.0]: https://opensource.org/licenses/AFL-3.0