Skip to content

Commit

Permalink
update deprecated actions, fix artifact paths
Browse files Browse the repository at this point in the history
+ update playwright to 1.41.2
  • Loading branch information
SteffenDE committed Feb 10, 2024
1 parent a3f6273 commit f6b6d4b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 39 deletions.
68 changes: 42 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
otp: 25.3
lint: lint

# update coverage report as well
- elixir: 1.15.5
otp: 26.0
lint: lint
Expand All @@ -32,7 +33,7 @@ jobs:
sudo apt update
sudo apt install -y inotify-tools
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
Expand All @@ -41,7 +42,7 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Restore deps and _build cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
deps
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
- name: Run tests
run: mix test --cover --export-coverage default

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: mix-test-coverage-${{ matrix.otp }}-${{ matrix.elixir }}
Expand All @@ -94,7 +95,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
Expand All @@ -103,7 +104,7 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Restore deps and _build cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
deps
Expand All @@ -116,12 +117,12 @@ jobs:
run: mix deps.get --only test

- name: Set up Node.js 18.x
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Restore npm cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -131,7 +132,7 @@ jobs:
- name: npm install and test
run: npm run js:test

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: js-unit-coverage
Expand All @@ -144,18 +145,18 @@ jobs:
strategy:
matrix:
include:
- elixir: 1.16.0
- elixir: 1.16.1
otp: 26.2

runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.0-jammy
image: mcr.microsoft.com/playwright:v1.41.2-jammy
env:
ImageOS: ubuntu22
HOME: /root
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: install unzip
run: apt update && apt -y install unzip
Expand All @@ -167,7 +168,7 @@ jobs:
otp-version: ${{ matrix.otp }}

- name: Restore deps and _build cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
deps
Expand All @@ -180,7 +181,7 @@ jobs:
run: mix deps.get

- name: Restore npm cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -198,21 +199,21 @@ jobs:
npm install
npm run e2e:test
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-results
path: test/e2e/test-results/
retention-days: 7

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: mix-e2e-coverage
Expand All @@ -227,47 +228,62 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: 1.16.1
otp-version: 26.2
elixir-version: 1.15.5
otp-version: 26.0

- name: Download mix unit coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mix-test-coverage-26.0-1.15.5
# This needs to be updated when changing the test matrix
name: mix-test-coverage-26-1.15.5
path: cover/

- name: Download mix e2e coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mix-e2e-coverage
path: cover/

- name: Restore deps and _build cache
uses: actions/cache@v4
with:
path: |
deps
_build
key: deps-${{ runner.os }}-26-1.15.0-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-26-1.15.0
- name: Generate mix coverage report
run: mix test.coverage

- name: Download js-unit-coverage artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: js-unit-coverage
path: assets/coverage/

- name: Download e2e-test-results artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: e2e-test-results
path: test/e2e/test-results/

- name: Set up Node.js 18.x
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Merge coverage reports
run: node cover:merge

- name: Upload coverage report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: overall-coverage
path: cover/
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"assets/js/phoenix_live_view/*"
],
"devDependencies": {
"@playwright/test": "^1.41.0",
"@playwright/test": "^1.41.2",
"monocart-reporter": "^2.3.1"
},
"scripts": {
Expand Down

0 comments on commit f6b6d4b

Please sign in to comment.