Update GitHub Action (experimental) #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.12', 'pypy-3.10'] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# - name: Setup node for the following actions | |
# run: | | |
# apt-get update && apt-get install -y software-properties-common npm | |
# npm install npm@latest -g && npm install n -g && n latest | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
pip3 install ".[dev]" | |
- name: Start NFD Docker | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/named-data/nfd:latest | |
registry: gcr.io | |
options: -v ${{ github.workspace }}/tests/config:/config -v /run/nfd:/run/nfd | |
- name: Run tests | |
run: pytest tests | |