Skip to content

Bump versions of some GitHub Actions #167

Bump versions of some GitHub Actions

Bump versions of some GitHub Actions #167

Workflow file for this run

name: Test
on: push
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Configure Node caching
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/cache@v4
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Node dependencies
run: npm install
- name: Download standalone Python
run: |
./download-python.sh
- name: Run tests
id: firstTest
run: npm test
timeout-minutes: 5
continue-on-error: true
- name: Retry tests once if they fail
if: steps.firstTest.outcome == 'failure'
run: npm test
timeout-minutes: 5
- name: Upload test videos
uses: actions/upload-artifact@v3
with:
name: test-videos
path: test-videos/
- name: Build distribution
if: github.ref == 'refs/heads/main'
env:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
run: npm run dist
- name: Create zip file
if: github.ref == 'refs/heads/main'
run: |
cd dist/mac
ditto -c -k --keepParent Datasette.app Datasette.app.zip
- name: And a README (to work around GitHub double-zips)
if: github.ref == 'refs/heads/main'
run: |
echo "More information: https://datasette.io" > dist/mac/README.txt
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: Datasette-macOS
path: |
dist/mac/Datasette.app.zip
dist/mac/README.txt