diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-04-25 11:44:30 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-04-25 11:44:30 +0200 |
| commit | b64e5909c26985bcb6be601e04b4df3244a6a968 (patch) | |
| tree | 487d01a333ac756b79275c387b771bf98e4f842c | |
| parent | 410965e0ba1ec6a59dea1e128822dd545cd58ab8 (diff) | |
| parent | 8fdd97ad4476e81b146bcdaad4ece47a56569ab1 (diff) | |
| download | mullvadvpn-b64e5909c26985bcb6be601e04b4df3244a6a968.tar.xz mullvadvpn-b64e5909c26985bcb6be601e04b4df3244a6a968.zip | |
Merge branch 'use-volta-in-actions'
| -rw-r--r-- | .github/workflows/frontend.yml | 24 | ||||
| -rw-r--r-- | .github/workflows/translations.yml | 21 | ||||
| -rw-r--r-- | .nvmrc | 1 |
3 files changed, 26 insertions, 20 deletions
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index d31c55509f..6cd1e415c6 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -16,21 +16,23 @@ jobs: runs-on: ${{ matrix.os }} steps: - # Prevent conversion of line-breaks on Windows - - run: git config --global core.autocrlf input - - name: Checkout repository uses: actions/checkout@v2 - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - cache-dependency-path: gui/package-lock.json + - name: Setup volta + uses: volta-cli/action@v1 - - name: Update NPM - run: npm i -g npm + - name: Get npm cache directory path + id: npm-cache-dir-path + run: echo "::set-output name=dir::$(npm config get cache)" + + - name: Cache npm dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.npm-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- - name: Install dependencies working-directory: gui diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 8bdf3a747a..08a0cf91b2 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -16,15 +16,20 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - cache-dependency-path: gui/package-lock.json + - name: Setup volta + uses: volta-cli/action@v1 + + - name: Get npm cache directory path + id: npm-cache-dir-path + run: echo "::set-output name=dir::$(npm config get cache)" - - name: Update NPM - run: npm i -g npm + - name: Cache npm dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.npm-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- - name: Install JS dependencies working-directory: gui diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 23d9c36a11..0000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -16.13.2 |
