Skip to content

Commit

Permalink
chore: reestablish functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Jun 3, 2024
1 parent 524566f commit f489300
Showing 1 changed file with 29 additions and 46 deletions.
75 changes: 29 additions & 46 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
name: Build bundle, check Linter and generate documentation
runs-on: ubuntu-latest
needs: test-repo

steps:

# Use specific Node.js version
Expand Down Expand Up @@ -126,55 +125,42 @@ jobs:
base-path: ./packages/${{ matrix.path }}
path-to-lcov: ./packages/${{ matrix.path }}/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.package }}
parallel: true

# Final Code coverage
finish-coverage:
name: finish parallel test unit
needs: unit-and-coverage-tests

# Functional tests
functional-tests:
name: Functional tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# Functional tests
# functional-tests:
# name: Functional tests
# needs: build
# runs-on: ubuntu-latest
# steps:

# # Use specific Node.js version
# - uses: actions/checkout@v3
# - name: Use Node.js 18.x
# uses: actions/setup-node@v3
# with:
# node-version: 18.x
# cache: 'npm'

# # Install packages
# - name: Install packages
# run: npm ci

# # Download artifact from build
# - name: Download itowns bundle
# uses: actions/download-artifact@v3
# with:
# name: dist-itowns

# - name: Run functional tests
# run: npm run test-functional

# Use specific Node.js version
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'

# Install packages
- name: Install packages
run: npm ci

# Download artifact from build
- name: Download itowns bundle
uses: actions/download-artifact@v3
with:
name: dist-itowns

- name: Run functional tests
run: npm run test-functional


# Publish NPM package
publish:
name: Publish NPM package
if: ${{ github.ref == 'refs/heads/master' }}
# needs: [finish-coverage, functional-tests]
needs: [finish-coverage]
needs: [finish-coverage, functional-tests]
runs-on: ubuntu-latest
permissions:
# id-token: write permission is required for npm provenance:
Expand Down Expand Up @@ -232,8 +218,7 @@ jobs:
deploy:
name: Deploy to itowns.github.io
if: ${{ github.ref == 'refs/heads/master' }}
# needs: [finish-coverage, functional-tests, check-commit-message]
needs: [finish-coverage, check-commit-message]
needs: [unit-and-coverage-tests, functional-tests, check-commit-message]
runs-on: ubuntu-latest
steps:

Expand All @@ -244,7 +229,6 @@ jobs:
name: dist-itowns

# Copy files for deployment
# !!! To change
- name: build site
run: |
mkdir -p itowns/dist
Expand Down Expand Up @@ -295,8 +279,7 @@ jobs:
release:
name: Release GitHub
if: ${{ github.ref == 'refs/heads/master' && startsWith( github.event.head_commit.message, 'release v' ) }}
# needs: [finish-coverage, functional-tests, check-commit-message]
needs: [finish-coverage, check-commit-message]
needs: [unit-and-coverage-tests, functional-tests, check-commit-message]
runs-on: ubuntu-latest
steps:

Expand Down

0 comments on commit f489300

Please sign in to comment.